diff --git a/contractcourt/breach_arbitrator_test.go b/contractcourt/breach_arbitrator_test.go index ac6477692..40dad40f4 100644 --- a/contractcourt/breach_arbitrator_test.go +++ b/contractcourt/breach_arbitrator_test.go @@ -2070,7 +2070,7 @@ func assertBrarCleanup(t *testing.T, brar *BreachArbitrator, }, 5*time.Second) if err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } } diff --git a/discovery/syncer_test.go b/discovery/syncer_test.go index 47c1a0941..a7d36e964 100644 --- a/discovery/syncer_test.go +++ b/discovery/syncer_test.go @@ -473,7 +473,7 @@ func TestGossipSyncerApplyNoHistoricalGossipFilter(t *testing.T) { // filter. err := <-errChan if err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } } diff --git a/htlcswitch/switch_test.go b/htlcswitch/switch_test.go index 9a9627579..17b0eef07 100644 --- a/htlcswitch/switch_test.go +++ b/htlcswitch/switch_test.go @@ -1087,11 +1087,11 @@ func TestSwitchForwardFailAfterFullAdd(t *testing.T) { // Now we will restart bob, leaving the forwarding decision for this // htlc is in the half-added state. if err := s.Stop(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } if err := cdb.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb2 := channeldb.OpenForTesting(t, tempPath) @@ -1139,7 +1139,7 @@ func TestSwitchForwardFailAfterFullAdd(t *testing.T) { // Send the fail packet from the remote peer through the switch. if err := s2.ForwardPackets(nil, fail); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } // Pull packet from alice's link, as it should have gone through @@ -1273,11 +1273,11 @@ func TestSwitchForwardSettleAfterFullAdd(t *testing.T) { // Now we will restart bob, leaving the forwarding decision for this // htlc is in the half-added state. if err := s.Stop(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } if err := cdb.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb2 := channeldb.OpenForTesting(t, tempPath) @@ -1327,7 +1327,7 @@ func TestSwitchForwardSettleAfterFullAdd(t *testing.T) { // Send the settle packet from the remote peer through the switch. if err := s2.ForwardPackets(nil, settle); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } // Pull packet from alice's link, as it should have gone through @@ -1454,11 +1454,11 @@ func TestSwitchForwardDropAfterFullAdd(t *testing.T) { // Now we will restart bob, leaving the forwarding decision for this // htlc is in the half-added state. if err := s.Stop(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } if err := cdb.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb2 := channeldb.OpenForTesting(t, tempPath) @@ -1601,11 +1601,11 @@ func TestSwitchForwardFailAfterHalfAdd(t *testing.T) { // Now we will restart bob, leaving the forwarding decision for this // htlc is in the half-added state. if err := s.Stop(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } if err := cdb.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb2 := channeldb.OpenForTesting(t, tempPath) @@ -1753,11 +1753,11 @@ func TestSwitchForwardCircuitPersistence(t *testing.T) { } if err := s.Stop(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } if err := cdb.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb2 := channeldb.OpenForTesting(t, tempPath) @@ -1847,7 +1847,7 @@ func TestSwitchForwardCircuitPersistence(t *testing.T) { } if err := cdb2.Close(); err != nil { - t.Fatalf(err.Error()) + t.Fatal(err) } cdb3 := channeldb.OpenForTesting(t, tempPath) @@ -3869,7 +3869,7 @@ func (c *interceptableSwitchTestContext) createTestPacket() *htlcPacket { func (c *interceptableSwitchTestContext) finish() { if err := c.s.Stop(); err != nil { - c.t.Fatalf(err.Error()) + c.t.Fatal(err) } } diff --git a/lnwallet/chanfunding/coin_select_test.go b/lnwallet/chanfunding/coin_select_test.go index 77c5a0e68..e20259c86 100644 --- a/lnwallet/chanfunding/coin_select_test.go +++ b/lnwallet/chanfunding/coin_select_test.go @@ -662,7 +662,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { if err != nil { switch { case test.expectErr == "": - t.Fatalf(err.Error()) + t.Fatal(err) case test.expectErr != removeAmounts(err.Error()): t.Fatalf("expected error '%v', got '%v'",