Skip to content

Commit

Permalink
Fix expected and actual order inversion
Browse files Browse the repository at this point in the history
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
  • Loading branch information
dborovcanin committed Feb 21, 2023
1 parent deb2aa1 commit aa6b098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ func TestFatal(t *testing.T) {
if e, ok := err.(*exec.ExitError); ok && !e.Success() {
res, err := writer.Read()
require.Nil(t, err, "required successful buffer read")
assert.Equal(t, e.ExitCode(), 1, fmt.Sprintf("%s: expected exit code %d, got %d", tc.desc, 1, e.ExitCode()))
assert.Equal(t, res, tc.output, fmt.Sprintf("%s: expected output %s got %s", tc.desc, tc.output, res))
assert.Equal(t, 1, e.ExitCode(), fmt.Sprintf("%s: expected exit code %d, got %d", tc.desc, 1, e.ExitCode()))
assert.Equal(t, tc.output, res, fmt.Sprintf("%s: expected output %s got %s", tc.desc, tc.output, res))
continue
}
t.Fatal("subprocess ran successfully, want non-zero exit status")
Expand Down

0 comments on commit aa6b098

Please sign in to comment.