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: change test image for container create test #2615

Merged
merged 1 commit into from
Dec 26, 2018

Conversation

rudyfly
Copy link
Collaborator

@rudyfly rudyfly commented Dec 26, 2018

Ⅰ. Describe what this PR did

change test image from docker.io/library/alpine to busyboxImage.

Ⅱ. Does this pull request fix one issue?

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

Just modify test cage.

Ⅳ. Describe how to verify it

ci pass

Ⅴ. Special notes for reviews

Signed-off-by: Rudy Zhang rudyflyzhang@gmail.com

@codecov
Copy link

codecov bot commented Dec 26, 2018

Codecov Report

Merging #2615 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2615      +/-   ##
==========================================
- Coverage   69.51%   69.43%   -0.08%     
==========================================
  Files         279      279              
  Lines       18833    18833              
==========================================
- Hits        13091    13077      -14     
- Misses       4277     4286       +9     
- Partials     1465     1470       +5
Flag Coverage Δ
#criv1alpha1test 31.86% <ø> (-0.07%) ⬇️
#criv1alpha2test 36.06% <ø> (-0.12%) ⬇️
#integrationtest 41.15% <ø> (-0.06%) ⬇️
#nodee2etest 33.29% <ø> (-0.04%) ⬇️
#unittest 26.78% <ø> (ø) ⬆️
Impacted Files Coverage Δ
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
cri/v1alpha2/cri_wrapper.go 64.4% <0%> (-2.4%) ⬇️
ctrd/image.go 76.95% <0%> (-2.18%) ⬇️
cri/v1alpha2/cri.go 68.93% <0%> (-0.75%) ⬇️
daemon/mgr/container.go 59.42% <0%> (+0.21%) ⬆️
daemon/mgr/snapshot.go 94.2% <0%> (+4.34%) ⬆️

image := "docker.io/library/alpine"
res := command.PouchRun("create", "--name", cname, image)
DelImageForceOk(c, busyboxImage)
res := command.PouchRun("create", "--name", cname, busyboxImage)
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can use command.PouchRun("create", "--name", cname, busyboxImage).Assert(c, icmd.Success) here :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make since

res.Assert(c, icmd.Success)
}

// TestCreateWithNonExistImage tests running container with image not exist.
func (suite *PouchCreateSuite) TestCreateWithNvidiaConfig(c *check.C) {
cname := "TestCreateWithNvidiaConfig"
image := "docker.io/library/alpine"
res := command.PouchRun("create", "--name", cname, "--nvidia-capabilities", "all", "--nvidia-visible-devs", "none", image)
res := command.PouchRun("create", "--name", cname,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

image := "docker.io/library/alpine"
res := command.PouchRun("create", "--name", cname, image)

res := command.PouchRun("create", "--name", cname, busyboxImage)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

change test image from `docker.io/library/alpine` to `busyboxImage`.

Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
@rudyfly
Copy link
Collaborator Author

rudyfly commented Dec 26, 2018

@fuweid PTAL

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 0b14152 into AliyunContainerService:master Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants