diff --git a/command/push_test.go b/command/push_test.go index 8d1ebf39b..a59050b25 100644 --- a/command/push_test.go +++ b/command/push_test.go @@ -204,8 +204,10 @@ func TestPush_vars(t *testing.T) { } args := []string{ + "-var-file", filepath.Join(testFixture("push-vars"), "vars.json"), "-var", "name=foo/bar", "-var", "one=two", + "-var", "overridden=yes", filepath.Join(testFixture("push-vars"), "template.json"), } if code := c.Run(args); code != 0 { @@ -217,8 +219,11 @@ func TestPush_vars(t *testing.T) { } expected := map[string]string{ - "name": "foo/bar", - "one": "two", + "bar": "baz", + "name": "foo/bar", + "null": "", + "one": "two", + "overridden": "yes", } if !reflect.DeepEqual(actualOpts.Vars, expected) { t.Fatalf("bad: %#v", actualOpts.Vars) diff --git a/command/test-fixtures/push-vars/vars.json b/command/test-fixtures/push-vars/vars.json new file mode 100644 index 000000000..4d5c9cc27 --- /dev/null +++ b/command/test-fixtures/push-vars/vars.json @@ -0,0 +1,5 @@ +{ + "null": null, + "bar": "baz", + "overridden": "no" +}