From 685e09c904b627915749254210511d863a2ea49d Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 2 Oct 2017 22:24:49 -0700 Subject: [PATCH] htlcswitch: expect proper error within TestChannelLinkMultiHopInsufficientPayment --- htlcswitch/link_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index fa1adafa6..d33a413e4 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -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.