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: modify the env test #2872

Merged
merged 1 commit into from
Jun 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/cli_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (suite *PouchCreateSuite) TestCreateWithEnv(c *check.C) {
env3 := "TEST3" // should not in container's real env
env4 := "TEST4=a b" // valid
env5 := "TEST5=a=b" // valid
res := command.PouchRun("run", "-d",
Copy link
Contributor

Choose a reason for hiding this comment

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

why change to create here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is "create" test, So I feel "create+start" is more suitable than "run".

res := command.PouchRun("create",
"--name", name,
"-e", env1,
"-e", env2,
Expand Down Expand Up @@ -339,6 +339,9 @@ func (suite *PouchCreateSuite) TestCreateWithEnv(c *check.C) {
}

// check if these envs are in the real container envs
res = command.PouchRun("start", name)
res.Assert(c, icmd.Success)

ret := command.PouchRun("exec", name, "env")
envs = ret.Stdout()

Expand Down