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: make TestRunWithWorkingDir test case happy #2140

Merged

Conversation

HusterWan
Copy link
Contributor

@HusterWan HusterWan commented Aug 22, 2018

Signed-off-by: Michael Wan zirenwan@gmail.com

Ⅰ. Describe what this PR did

fix TestRunWithWorkingDir not success in some specific kernel

Ⅱ. Does this pull request fix one issue?

none

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

It is a test case

Ⅳ. Describe how to verify it

TestRunWithWorkingDir passed on all test hosts

Ⅴ. Special notes for reviews

none

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2140      +/-   ##
==========================================
- Coverage   64.44%   64.41%   -0.04%     
==========================================
  Files         209      209              
  Lines       16629    16629              
==========================================
- Hits        10717    10712       -5     
- Misses       4585     4590       +5     
  Partials     1327     1327
Flag Coverage Δ
#criv1alpha1test 32.76% <ø> (-0.32%) ⬇️
#criv1alpha2test 33.56% <ø> (+0.14%) ⬆️
#integrationtest 39.25% <ø> (-0.07%) ⬇️
#unittest 23.91% <ø> (ø) ⬆️
Impacted Files Coverage Δ
daemon/mgr/snapshot.go 89.85% <0%> (-4.35%) ⬇️
ctrd/image.go 76.75% <0%> (-2.2%) ⬇️
cri/v1alpha1/cri.go 63.69% <0%> (-0.35%) ⬇️
daemon/mgr/container.go 56.65% <0%> (ø) ⬆️
cri/v1alpha2/cri.go 64.63% <0%> (+0.33%) ⬆️
ctrd/watch.go 80.3% <0%> (+4.54%) ⬆️

res := command.PouchRun("run", "-m", "100m", "-w", dir, "--name", cname, busyboxImage, "pwd")
// Some Kernel not support Memory, so result information may contains some
// warning information like:
// WARNING: Current Kernel does not support memory swap, discard --memory-swap
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should add the -m 100m in this case, because we didn't check the memory. Please remove the comment.

Signed-off-by: Michael Wan <zirenwan@gmail.com>
@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Aug 22, 2018
@allencloud allencloud merged commit 98d107f into AliyunContainerService:master Aug 22, 2018
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/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants