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: add cli test for pause command and fix some tiny bugs #1360

Merged
merged 1 commit into from
May 22, 2018

Conversation

ZouRui89
Copy link
Contributor

Signed-off-by: Zou Rui 21751189@zju.edu.cn

Ⅰ. Describe what this PR did

This pr add the related cli test for pause command and fix some tiny bugs to keep consistency with other commands.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added areas/cli areas/test kind/bug This is bug report for project size/M labels May 21, 2018
// pause with the container name missing and pause with an unwanted flag, respectively.
func (suite *PouchPauseSuite) TestPauseInWrongWay(c *check.C) {
// generate a stopped container to test
stoppedContainerName := "not running"
Copy link
Contributor

Choose a reason for hiding this comment

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

please change the container name to remove space.

{name: "unwanted flag", args: "-m"},
} {
res := command.PouchRun("pause", tc.args)
c.Assert(res.Error, check.IsNil, check.Commentf(tc.name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to check res.Stderr() including the expected error message.

Signed-off-by: Zou Rui <21751189@zju.edu.cn>
@ZouRui89
Copy link
Contributor Author

Updated @Letty5411

@ZouRui89 ZouRui89 merged commit 499f3cd into AliyunContainerService:master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/cli areas/test kind/bug This is bug report for project size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants