Skip to content

Commit 53a0848

Browse files
author
Matthew Fisher
committed
test(client): add --buildpack tests
1 parent 828bca9 commit 53a0848

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

tests/apps_test.go

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ import (
1111
)
1212

1313
var (
14-
appsCreateCmd = "apps:create {{.AppName}}"
15-
appsCreateCmdNoRemote = "apps:create {{.AppName}} --no-remote"
16-
appsListCmd = "apps:list"
17-
appsRunCmd = "apps:run echo hello"
18-
appsOpenCmd = "apps:open --app={{.AppName}}"
19-
appsLogsCmd = "apps:logs --app={{.AppName}}"
20-
appsInfoCmd = "apps:info --app={{.AppName}}"
21-
appsDestroyCmd = "apps:destroy --app={{.AppName}} --confirm={{.AppName}}"
14+
appsCreateCmd = "apps:create {{.AppName}}"
15+
appsCreateCmdNoRemote = "apps:create {{.AppName}} --no-remote"
16+
appsCreateCmdBuildpack = "apps:create {{.AppName}} --buildpack https://example.com"
17+
appsListCmd = "apps:list"
18+
appsRunCmd = "apps:run echo hello"
19+
appsOpenCmd = "apps:open --app={{.AppName}}"
20+
appsLogsCmd = "apps:logs --app={{.AppName}}"
21+
appsInfoCmd = "apps:info --app={{.AppName}}"
22+
appsDestroyCmd = "apps:destroy --app={{.AppName}} --confirm={{.AppName}}"
2223
)
2324

2425
func randomString(n int) string {
@@ -56,9 +57,11 @@ func appsCreateTest(t *testing.T, params *utils.DeisTestConfig) {
5657
if err := utils.Chdir(params.ExampleApp); err != nil {
5758
t.Fatal(err)
5859
}
59-
cmd := appsCreateCmd
60-
utils.Execute(t, cmd, params, false, "")
61-
utils.Execute(t, cmd, params, true, "App with this Id already exists")
60+
// TODO: move --buildpack to client unit tests
61+
utils.Execute(t, appsCreateCmdBuildpack, params, false, "BUILDPACK_URL")
62+
utils.Execute(t, appsDestroyCmd, params, false, "")
63+
utils.Execute(t, appsCreateCmd, params, false, "")
64+
utils.Execute(t, appsCreateCmd, params, true, "App with this Id already exists")
6265
}
6366

6467
func appsDestroyTest(t *testing.T, params *utils.DeisTestConfig) {

0 commit comments

Comments
 (0)