Skip to content

Commit

Permalink
cerrors_test fix, .GetStackTrace would return [] or nil and could not…
Browse files Browse the repository at this point in the history
… be caught by isTrue(res == nil) alone
  • Loading branch information
AdamHaffar committed Sep 16, 2023
1 parent 67d6196 commit 551376d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/foundation/cerrors/cerrors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestGetStackTrace(t *testing.T) {

res := cerrors.GetStackTrace(tc.err)
if tc.expected == nil {
is.True(res == nil)
is.True(res == nil || len(res.([]cerrors.Frame)) == 0)
return
}
act, ok := res.([]cerrors.Frame)
Expand Down

0 comments on commit 551376d

Please sign in to comment.