htlcswitch: expect proper error within TestChannelLinkMultiHopInsufficientPayment

This commit is contained in:
Olaoluwa Osuntokun 2017-10-02 22:24:49 -07:00
parent 0c9384d991
commit 685e09c904
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"runtime"
"strings"
"sync"
"testing"
"time"
@ -15,7 +16,6 @@ import (
"math"
"github.com/davecgh/go-spew/spew"
"github.com/go-errors/errors"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwire"
@ -694,8 +694,8 @@ func TestChannelLinkMultiHopInsufficientPayment(t *testing.T) {
n.bobServer.PubKey(), hops, amount, htlcAmt, totalTimelock)
if err == nil {
t.Fatal("error haven't been received")
} else if err.Error() != errors.New(lnwire.CodeTemporaryChannelFailure).Error() {
t.Fatalf("wrong error have been received: %v", err)
} else if !strings.Contains(err.Error(), "insufficient capacity") {
t.Fatalf("wrong error has been received: %v", err)
}
// Wait for Alice to receive the revocation.