Skip to content

Commit

Permalink
Add test-case for env with, and without =
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 23, 2020
1 parent a4a3d2f commit 0eb3cfd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli/command/image/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ func TestNewImportCommandSuccess(t *testing.T) {
},
{
name: "change",
args: []string{"--change", "ENV DEBUG=true", "-"},
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
assert.Check(t, is.Equal("ENV DEBUG=true", options.Changes[0]))
return ioutil.NopCloser(strings.NewReader("")), nil
},
},
{
name: "change legacy syntax",
args: []string{"--change", "ENV DEBUG true", "-"},
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
assert.Check(t, is.Equal("ENV DEBUG true", options.Changes[0]))
Expand Down

0 comments on commit 0eb3cfd

Please sign in to comment.