Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 8b51565

Browse files
committed
Add test-case for env with, and without =
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 0eb3cfd261d7fe6fe22a0d8d2768a5270c226604) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 278f30b82b155a614b863b6b575e2f157d42d1af Component: cli
1 parent 4e0e542 commit 8b51565

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

components/cli/cli/command/image/import_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ func TestNewImportCommandSuccess(t *testing.T) {
8181
},
8282
{
8383
name: "change",
84+
args: []string{"--change", "ENV DEBUG=true", "-"},
85+
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
86+
assert.Check(t, is.Equal("ENV DEBUG=true", options.Changes[0]))
87+
return ioutil.NopCloser(strings.NewReader("")), nil
88+
},
89+
},
90+
{
91+
name: "change legacy syntax",
8492
args: []string{"--change", "ENV DEBUG true", "-"},
8593
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
8694
assert.Check(t, is.Equal("ENV DEBUG true", options.Changes[0]))

0 commit comments

Comments
 (0)