diff --git a/accounts/abi/unpack_test.go b/accounts/abi/unpack_test.go index e0d3bfc6d7..d6f5ffae0c 100644 --- a/accounts/abi/unpack_test.go +++ b/accounts/abi/unpack_test.go @@ -946,7 +946,7 @@ func TestOOMMaliciousInput(t *testing.T) { } encb, err := hex.DecodeString(test.enc) if err != nil { - t.Fatalf("invalid hex: %s" + test.enc) + t.Fatalf("invalid hex: %s", test.enc) } _, err = abi.Methods["method"].Outputs.UnpackValues(encb) if err == nil { diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go index 344c0f21e3..f3287e9134 100644 --- a/core/rawdb/accessors_chain_test.go +++ b/core/rawdb/accessors_chain_test.go @@ -338,10 +338,10 @@ func TestBlockReceiptStorage(t *testing.T) { // Insert the receipt slice into the database and check presence WriteReceipts(db, hash, 0, receipts) if rs := ReadReceipts(db, hash, 0, params.TestChainConfig); len(rs) == 0 { - t.Fatalf("no receipts returned") + t.Fatal("no receipts returned") } else { if err := checkReceiptsRLP(rs, receipts); err != nil { - t.Fatalf("fail to checkReceiptsRLP %v", err) + t.Fatal(err) } } // Delete the body and ensure that the receipts are no longer returned (metadata can't be recomputed) @@ -351,7 +351,7 @@ func TestBlockReceiptStorage(t *testing.T) { } // Ensure that receipts without metadata can be returned without the block body too if err := checkReceiptsRLP(ReadRawReceipts(db, hash, 0), receipts); err != nil { - t.Fatalf("fail to checkReceiptsRLP %v", err) + t.Fatal(err) } // Sanity check that body alone without the receipt is a full purge WriteBody(db, hash, 0, body) diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go index 681586b46c..f21db0818a 100644 --- a/internal/flags/flags_test.go +++ b/internal/flags/flags_test.go @@ -17,7 +17,6 @@ package flags import ( - "os" "os/user" "runtime" "testing" @@ -51,7 +50,7 @@ func TestPathExpansion(t *testing.T) { } } - os.Setenv(`DDDXXX`, `/tmp`) + t.Setenv(`DDDXXX`, `/tmp`) for test, expected := range tests { got := expandPath(test) if got != expected {