-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add testcase in generic_error_test.go #1402
Conversation
libcontainer/generic_error_test.go
Outdated
} | ||
} else { | ||
if msg := err.Error(); msg == v.errmsg { | ||
t.Fatalf("expected err msg %q but %q", msg, v.errmsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are testing that they aren't equal but the message doesn't say that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrunalp
I haved changed the error messages.
cad9318
to
986dd34
Compare
libcontainer/generic_error_test.go
Outdated
t.Fatalf("expected err(%q) equal errmsg(%q)", msg, v.errmsg) | ||
} | ||
if v.cause != "" && msg == v.errmsg { | ||
t.Fatalf("upexpected err(%q) equal errmsg(%q)", msg, v.errmsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: upexpected -> unexpected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrunalp
I have modified. thanks!
Signed-off-by: chchliang <[email protected]>
add testcase with function
Error(),Code()
in generic_error_test.goSigned-off-by: chchliang [email protected]