Skip to content

Commit b4700da

Browse files
author
Matthew Fisher
committed
test(tests): supply envvar with spaces
1 parent 1d56b0c commit b4700da

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/config_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var (
1212
configListCmd = "config:list --app={{.AppName}}"
1313
configSetCmd = "config:set FOO=讲台 --app={{.AppName}}"
1414
configSet2Cmd = "config:set FOO=10 --app={{.AppName}}"
15+
configSet3Cmd = "config:set HELLO=\"from the Deis team\" --app={{.AppName}}"
1516
configUnsetCmd = "config:unset FOO --app={{.AppName}}"
1617
)
1718

@@ -40,6 +41,9 @@ func configSetup(t *testing.T) *utils.DeisTestConfig {
4041
t.Fatal(err)
4142
}
4243
utils.Execute(t, appsCreateCmd, cfg, false, "")
44+
// ensure envvars with spaces work fine on `git push`
45+
// https://github.com/deis/deis/issues/2477
46+
utils.Execute(t, configSet3Cmd, cfg, false, "from the Deis team")
4347
utils.Execute(t, gitPushCmd, cfg, false, "")
4448
if err := utils.Chdir(".."); err != nil {
4549
t.Fatal(err)
@@ -54,13 +58,13 @@ func configListTest(
5458

5559
func configSetTest(t *testing.T, params *utils.DeisTestConfig) {
5660
utils.Execute(t, configSetCmd, params, false, "讲台")
57-
utils.CheckList(t, appsInfoCmd, params, "(v3)", false)
58-
utils.Execute(t, configSet2Cmd, params, false, "10")
5961
utils.CheckList(t, appsInfoCmd, params, "(v4)", false)
62+
utils.Execute(t, configSet2Cmd, params, false, "10")
63+
utils.CheckList(t, appsInfoCmd, params, "(v5)", false)
6064
}
6165

6266
func configUnsetTest(t *testing.T, params *utils.DeisTestConfig) {
6367
utils.Execute(t, configUnsetCmd, params, false, "")
64-
utils.CheckList(t, appsInfoCmd, params, "(v5)", false)
68+
utils.CheckList(t, appsInfoCmd, params, "(v6)", false)
6569
utils.CheckList(t, "run env --app={{.AppName}}", params, "FOO", true)
6670
}

0 commit comments

Comments
 (0)