Skip to content

Commit 0cb75fa

Browse files
author
Matthew Fisher
committed
test(builds): add test for deis pull -p
1 parent 9871a3d commit 0cb75fa

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/builds_test.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
var (
1818
buildsListCmd = "builds:list --app={{.AppName}}"
19-
buildsCreateCmd = "builds:create {{.ImageID}} --app={{.AppName}}"
19+
buildsCreateCmd = `builds:create {{.ImageID}} --app={{.AppName}} --procfile="worker: while true; do echo hi; sleep 3; done"`
2020
)
2121

2222
func TestBuilds(t *testing.T) {
@@ -28,6 +28,7 @@ func TestBuilds(t *testing.T) {
2828
// TODO: router needs a few seconds to wake up here--fixme!
2929
time.Sleep(5000 * time.Millisecond)
3030
appsOpenTest(t, params)
31+
buildsScaleTest(t, params)
3132
utils.AppsDestroyTest(t, params)
3233
}
3334

@@ -84,3 +85,15 @@ func buildsCreateTest(t *testing.T, params *utils.DeisTestConfig) {
8485
t.Fatal(err)
8586
}
8687
}
88+
89+
// buildsScaleTest ensures that we can use a Procfile-based workflow for `deis pull`.
90+
func buildsScaleTest(t *testing.T, params *utils.DeisTestConfig) {
91+
if err := utils.Chdir(params.ExampleApp); err != nil {
92+
t.Fatal(err)
93+
}
94+
utils.Execute(t, "scale worker=1 --app={{.AppName}}", params, false, "")
95+
utils.Execute(t, "logs --app={{.AppName}}", params, false, "hi")
96+
if err := utils.Chdir(".."); err != nil {
97+
t.Fatal(err)
98+
}
99+
}

0 commit comments

Comments
 (0)