Skip to content

Commit d276d09

Browse files
author
smothiki
committed
feat(test): add deis build integration test that supports v2-alpha
1 parent 702d79d commit d276d09

1 file changed

Lines changed: 34 additions & 10 deletions

File tree

_tests/builds_test.go

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
11
package _tests_test
22

33
import (
4+
"fmt"
5+
46
. "github.com/onsi/ginkgo"
5-
// . "github.com/onsi/gomega"
7+
. "github.com/onsi/gomega"
68
)
79

810
var _ = Describe("Builds", func() {
9-
Context("with a deployed app", func() {
11+
appName := getRandAppName()
12+
Context("with a logged-in user", func() {
13+
BeforeEach(func() {
14+
login(url, testUser, testPassword)
15+
})
1016

11-
It("can list app builds", func() {
12-
// "deis builds:list --app=%s", app
17+
Context("with no app", func() {
18+
It("can create an app", func() {
19+
output, err := execute("deis apps:create %s --no-remote", appName)
20+
Expect(err).NotTo(HaveOccurred())
21+
Expect(output).To(ContainSubstring(fmt.Sprintf("Creating Application... done, created %s", appName)))
22+
})
23+
It("can deploy the app", func() {
24+
output, err := execute("deis builds:create %s -a %s", "deis/example-go", appName)
25+
Expect(err).NotTo(HaveOccurred())
26+
Expect(output).To(ContainSubstring("Creating build... done"))
27+
})
28+
It("can list app builds", func() {
29+
output, err := execute("deis builds:list --app=%s", appName)
30+
Expect(err).NotTo(HaveOccurred())
31+
Expect(output).To(SatisfyAll(
32+
MatchRegexp(`[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}`)))
33+
})
1334
})
1435

15-
It("can create a build from an existing image (\"deis pull\")", func() {
16-
// "deis builds:create %s --app=%s", image, app
17-
// curl app
18-
// `deis pull %s -a %s --procfile="worker: while true; do echo hi; sleep 3; done"`, image, app
19-
// "deis ps:scale worker=1"
20-
// "deis logs --app=%s", app
36+
Context("with a deployed app", func() {
37+
38+
XIt("can list app builds", func() {
39+
})
40+
41+
XIt("can create a build from an existing image (\"deis pull\")", func() {
42+
43+
})
2144
})
45+
2246
})
2347
})

0 commit comments

Comments
 (0)