multi: move many t.Fatalf calls to require.NoError
This commit is contained in:
1 parent
9e6f0ef46b
commit
9a10c80bcb
92 files changed
+1905
-5565
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type mockChannelRestorer struct {
|
||||
@@ -108,9 +109,7 @@ func TestUnpackAndRecoverSingles(t *testing.T) {
|
||||
err = UnpackAndRecoverSingles(
|
||||
packedBackups, keyRing, &chanRestorer, &peerConnector,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to recover chans: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to recover chans")
|
||||
|
||||
// Both the restorer, and connector should have been called 10 times,
|
||||
// once for each backup.
|
||||
@@ -204,9 +203,7 @@ func TestUnpackAndRecoverMulti(t *testing.T) {
|
||||
err = UnpackAndRecoverMulti(
|
||||
packedMulti, keyRing, &chanRestorer, &peerConnector,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to recover chans: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to recover chans")
|
||||
|
||||
// Both the restorer, and connector should have been called 10 times,
|
||||
// once for each backup.
|
||||
|
||||
Reference in new issue
Block a user