Skip to content

Commit

Permalink
Add testcase for build arg without value
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Mar 22, 2017
1 parent fd3aef5 commit 8f37715
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-cli/docker_cli_build_test.go
Expand Up @@ -4641,6 +4641,7 @@ func (s *DockerSuite) TestBuildBuildTimeArgEnv(c *check.C) {
ARG FOO4=fromfile
ARG FOO5
ARG FOO6
ARG FO10
RUN env
RUN [ "$FOO1" == "fromcmd" ]
RUN [ "$FOO2" == "" ]
Expand All @@ -4652,6 +4653,7 @@ func (s *DockerSuite) TestBuildBuildTimeArgEnv(c *check.C) {
RUN [ "$(env | grep FOO7)" == "" ]
RUN [ "$(env | grep FOO8)" == "" ]
RUN [ "$(env | grep FOO9)" == "" ]
RUN [ "$FO10" == "" ]
`
result := buildImage("testbuildtimeargenv",
withBuildFlags(
Expand All @@ -4664,6 +4666,7 @@ func (s *DockerSuite) TestBuildBuildTimeArgEnv(c *check.C) {
"--build-arg", fmt.Sprintf("FOO7=fromcmd"), // should produce a warning
"--build-arg", fmt.Sprintf("FOO8="), // should produce a warning
"--build-arg", fmt.Sprintf("FOO9"), // should produce a warning
"--build-arg", fmt.Sprintf("FO10"), // not set in env, empty value
),
withEnvironmentVariales(append(os.Environ(),
"FOO1=fromenv",
Expand Down

0 comments on commit 8f37715

Please sign in to comment.