Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Nov 11, 2021
1 parent 6311292 commit 1074ac2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/gossamer/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestSetupLogger(t *testing.T) {
"Test gossamer --log blah",
[]string{"log"},
[]interface{}{"blah"},
fmt.Errorf("Unknown level: blah"),
fmt.Errorf("cannot parse log level string: Unknown level: blah"),
},
}

Expand All @@ -135,7 +135,12 @@ func TestSetupLogger(t *testing.T) {
require.Nil(t, err)

_, err = setupLogger(ctx)
require.Equal(t, c.expected, err)

if c.expected != nil {
require.EqualError(t, err, c.expected.Error())
} else {
require.NoError(t, err)
}
})
}
}

0 comments on commit 1074ac2

Please sign in to comment.