multi: move many t.Fatalf calls to require.NoError

This commit is contained in:
Tommy Volk
2022-05-05 20:11:50 +00:00
parent 9e6f0ef46b
commit 9a10c80bcb
92 changed files with 1905 additions and 5565 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/btcsuite/btcd/btcutil/bech32"
"github.com/btcsuite/btcd/chaincfg"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/stretchr/testify/require"
)
// TestDecodeAmount ensures that the amount string in the hrp of the Invoice
@@ -567,9 +568,7 @@ func TestParseMaxUint64Expiry(t *testing.T) {
expiryBytes := uint64ToBase32(expiry)
expiryReParse, err := base32ToUint64(expiryBytes)
if err != nil {
t.Fatalf("unable to parse uint64: %v", err)
}
require.NoError(t, err, "unable to parse uint64")
if expiryReParse != expiry {
t.Fatalf("wrong expiry: expected %v got %v", expiry,