command/push: Add test for var-file push to Atlas

This commit is contained in:
Justin Campbell 2016-01-15 11:57:30 -05:00 committed by Matthew Hooker
parent 56cd8171cc
commit 16adc3f7cc
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
2 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

@ -0,0 +1,5 @@
{
"null": null,
"bar": "baz",
"overridden": "no"
}