test: migrate test api error not found json#51216
Conversation
f6889bb to
c9778cc
Compare
integration/system/utils_test.go
Outdated
| // getErrorMessage returns the error message from an error API response | ||
| func getErrorMessage(t *testing.T, body []byte) string { |
There was a problem hiding this comment.
Maybe we should consider adding a small function to the request test-utility to help with decoding JSON responses (check status code, content-type, then unmarshal into a variable that's passed. 🤔
Doesn't have to be for this PR, but I could have a quick peek
|
Thanks for the review, @thaJeztah! |
|
Both add the same |
|
@sameergupta4873 #51220 was merged, so you can rebase this PR (and use the new utility) 👍 |
e858aab to
0e6868d
Compare
0e6868d to
084f9b8
Compare
|
Hi @thaJeztah, I’ve the correct usage of ctx in TestAPIErrorNotFoundJSON. All changes are now fixed. Could you please approve again? Thanks! |
Signed-off-by: Sameer Gupta <sameergupta4873@gmail.com>
084f9b8 to
62a71a8
Compare
|
oh! good catch; missed that! still LGTM ; I gave CI a kick 👍 |
|
All green; let's merge! Thank you for contributing! |
- What I did
Migrated the TestAPIErrorNotFoundJSON to integration tests in reference to the integration-cli migration epic #50159
- How I did it
Using test on integration-cli/docker_api_test.go
- How to verify it
Run the integration test
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)
🐳