misc: refactor loop tests to use require where possible

This commit is contained in:
Andras Banki-Horvath 2022-11-29 21:36:14 +01:00
parent bdb4b773ed
commit 049b17ff96
No known key found for this signature in database
GPG key ID: 80E5375C094198D8
10 changed files with 100 additions and 193 deletions

View file

@ -63,10 +63,7 @@ func newLoopInTestContext(t *testing.T) *loopInTestContext {
func (c *loopInTestContext) assertState(expectedState loopdb.SwapState) {
state := <-c.statusChan
if state.State != expectedState {
c.t.Fatalf("expected state %v but got %v", expectedState,
state.State)
}
require.Equal(c.t, expectedState, state.State)
}
// assertSubscribeInvoice asserts that the client subscribes to invoice updates