mirror of https://github.com/docker/cli.git
Add test-case for env with, and without =
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a4a3d2f94d
commit
0eb3cfd261
|
@ -81,6 +81,14 @@ func TestNewImportCommandSuccess(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "change",
|
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", "-"},
|
args: []string{"--change", "ENV DEBUG true", "-"},
|
||||||
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
|
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
|
||||||
assert.Check(t, is.Equal("ENV DEBUG true", options.Changes[0]))
|
assert.Check(t, is.Equal("ENV DEBUG true", options.Changes[0]))
|
||||||
|
|
Loading…
Reference in New Issue