Add non-cli counterpart of TestBuildEmitsEvents#50157
Add non-cli counterpart of TestBuildEmitsEvents#50157aciba90 wants to merge 1 commit intomoby:masterfrom
Conversation
vvoland
left a comment
There was a problem hiding this comment.
Thanks!
This is still an integration-cli test though. The integration-cli package is deprecated in favor of the e2e tests on the CLI.
What we currently need is a non-CLI integration test like these in:
https://github.com/moby/moby/tree/master/integration/build
| res, body, err := request.Post( | ||
| ctx, | ||
| "/build"+tc.query, | ||
| request.RawContent(bCtx.AsTarReader(t)), | ||
| request.ContentType("application/x-tar")) |
There was a problem hiding this comment.
In the integration tests, you can just use the regular API client like:
moby/integration/build/build_test.go
Lines 329 to 335 in 145834f
Fixes moby#49679 Signed-off-by: Alberto Contreras <alberto.contreras@canonical.com>
7446be8 to
b20951a
Compare
|
Apologies for the misunderstanding. I have retargeted the test. As the test was partially implemented in moby/integration/build/build_test.go Line 734 in 145834f LMK if more changes are required, or if two separated tests are preferred. Thanks, @vvoland, for pointing me to the right direction. |
Fixes #49679
- What I did
I added a test integration-cli/docker_api_build_test.go mimicking TestBuildEmitsEvents under integration-cli/docker_cli_build_test.go to cover that additional code path per #49679.
- How I did it
I addapted the existent test to this testing environment.
- How to verify it
TESTFLAGS='-test.run TestDockerAPISuite/TestBuildEmitsEvents' make test-integration- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)
