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

@@ -6,6 +6,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/stretchr/testify/require"
)
// TestStore asserts that the store persists the presented data to disk and is
@@ -125,9 +126,7 @@ func testStore(t *testing.T, createStore func() (SweeperStore, error)) {
}
txns, err := store.ListSweeps()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
require.NoError(t, err, "unexpected error")
// Create a map containing the sweeps we expect to be returned by list
// sweeps.