mirror of https://github.com/docker/cli.git
Merge pull request #29104 from duglin/Issue29084
Fix processing of unset build-args during build
This commit is contained in:
commit
50d32cdc08
|
@ -27,6 +27,8 @@ func TestImageBuildError(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestImageBuild(t *testing.T) {
|
||||
v1 := "value1"
|
||||
v2 := "value2"
|
||||
emptyRegistryConfig := "bnVsbA=="
|
||||
buildCases := []struct {
|
||||
buildOptions types.ImageBuildOptions
|
||||
|
@ -105,13 +107,14 @@ func TestImageBuild(t *testing.T) {
|
|||
},
|
||||
{
|
||||
buildOptions: types.ImageBuildOptions{
|
||||
BuildArgs: map[string]string{
|
||||
"ARG1": "value1",
|
||||
"ARG2": "value2",
|
||||
BuildArgs: map[string]*string{
|
||||
"ARG1": &v1,
|
||||
"ARG2": &v2,
|
||||
"ARG3": nil,
|
||||
},
|
||||
},
|
||||
expectedQueryParams: map[string]string{
|
||||
"buildargs": `{"ARG1":"value1","ARG2":"value2"}`,
|
||||
"buildargs": `{"ARG1":"value1","ARG2":"value2","ARG3":null}`,
|
||||
"rm": "0",
|
||||
},
|
||||
expectedTags: []string{},
|
||||
|
|
Loading…
Reference in New Issue