-
Notifications
You must be signed in to change notification settings - Fork 44
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
tests: add more coverage to composeStatus when response is InternalServerError #1306
tests: add more coverage to composeStatus when response is InternalServerError #1306
Conversation
8dea797
to
0e6453e
Compare
0e6453e
to
ca983d4
Compare
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.
Raising the coverage is super cool 🥳📈
as this test is pretty similar to TestGetComposeStatusNotFoundResponse
maybe you can use the pattern testCases := []struct {…
and for _, tc := range testCases {
as implemented for example in TestWithoutOsbuildComposerBackend
or similar here too and unify
TestGetComposeStatusNotFoundResponse
with TestGetComposeStatusInternalServerErrorResponse
in one test function (having all common code only once
@schuellerf in |
ca983d4
to
3940e4f
Compare
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.
You can rewrite to make less code duplication or we'll take it as is for now, so I'll approve and you can choose
3940e4f
to
ae058e4
Compare
The unit tests are failing now, apart of that, nice job! 🎉 |
04f488a
to
9796545
Compare
5bdd168
to
ea30952
Compare
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.
so I guess TestGetComposeStatusNotFoundResponse()
is not obsolete and can be removed?
Looks nice once the code duplication is removed!
ea30952
to
f7ee2dc
Compare
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.
Cool, thanks!
f7ee2dc
to
07c50ea
Compare
…rverError This commit add unit test for getComposeStatus handling the StatusInternalServerError response after composeStatus found. Increase the coverage of GetComposeStatus from 70.3% to 83.8%
07c50ea
to
2034e1d
Compare
This commit add unit test for
getComposeStatus
handling the StatusInternalServerError response after composeStatus found.Increase the coverage of GetComposeStatus from 70.3% to 83.8%