Skip to content
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

test: update the existing tag image case #2547

Merged
merged 1 commit into from
Dec 10, 2018
Merged

test: update the existing tag image case #2547

merged 1 commit into from
Dec 10, 2018

Conversation

fuweid
Copy link
Contributor

@fuweid fuweid commented Dec 10, 2018

Signed-off-by: Wei Fu fuweid89@gmail.com

Ⅰ. Describe what this PR did

The TestImageTagFailToOverrideExistingTag tests the case that it will
fail to use existing tag name to override existing tag.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

update existing case

Ⅳ. Describe how to verify it

wait for CI

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #2547 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2547      +/-   ##
==========================================
+ Coverage   69.11%   69.11%   +<.01%     
==========================================
  Files         278      278              
  Lines       18528    18528              
==========================================
+ Hits        12805    12806       +1     
+ Misses       4259     4256       -3     
- Partials     1464     1466       +2
Flag Coverage Δ
#criv1alpha1test 31.16% <ø> (-0.08%) ⬇️
#criv1alpha2test 35.52% <ø> (+0.06%) ⬆️
#integrationtest 40.51% <ø> (-0.12%) ⬇️
#nodee2etest 32.7% <ø> (+0.15%) ⬆️
#unittest 26.85% <ø> (ø) ⬆️
Impacted Files Coverage Δ
daemon/mgr/system.go 67.93% <0%> (-5.35%) ⬇️
ctrd/watch.go 80.28% <0%> (-4.23%) ⬇️
cri/v1alpha2/cri_wrapper.go 61.2% <0%> (-1.2%) ⬇️
ctrd/container.go 58.01% <0%> (-1.19%) ⬇️
daemon/mgr/container_utils.go 83.33% <0%> (-0.6%) ⬇️
cri/v1alpha1/cri.go 60.26% <0%> (-0.34%) ⬇️
daemon/mgr/container.go 58.69% <0%> (-0.22%) ⬇️
cri/v1alpha2/cri.go 69.81% <0%> (+0.25%) ⬆️
daemon/logger/jsonfile/utils.go 73.17% <0%> (+1.62%) ⬆️
ctrd/image.go 78.94% <0%> (+2.19%) ⬆️
... and 3 more

resp, err := suite.sendRequest(busyboxImage, repo, tag)
c.Assert(err, check.IsNil)
CheckRespStatus(c, resp, 201)
defer DelImageForceOk(c, tagRef)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete tagRef image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tagRef image is created by the case. If we don't delete it, re-run this case will fail. It just is used to clean up.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the busyboxImage also will be remain, dont need to delele it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

busyboxImage is created for the case suite and basically, all suites are related to this image. Therefore, we don't need to delete it.

The TestImageTagFailToOverrideExistingTag tests the case that it will
fail to use existing tag name to override existing tag.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
@rudyfly
Copy link
Collaborator

rudyfly commented Dec 10, 2018

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Dec 10, 2018
@rudyfly rudyfly merged commit 2ccc17d into AliyunContainerService:master Dec 10, 2018
@fuweid fuweid deleted the test_update_image_tag_case branch December 10, 2018 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/test LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants