-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuilds_test.go
More file actions
47 lines (38 loc) · 1.2 KB
/
builds_test.go
File metadata and controls
47 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package _tests_test
import (
"fmt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Builds", func() {
appName := getRandAppName()
Context("with a logged-in user", func() {
BeforeEach(func() {
login(url, testUser, testPassword)
})
Context("with no app", func() {
It("can create an app", func() {
output, err := execute("deis apps:create %s --no-remote", appName)
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring(fmt.Sprintf("Creating Application... done, created %s", appName)))
})
It("can deploy the app", func() {
output, err := execute("deis builds:create %s -a %s", "deis/example-go", appName)
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring("Creating build... done"))
})
It("can list app builds", func() {
output, err := execute("deis builds:list --app=%s", appName)
Expect(err).NotTo(HaveOccurred())
Expect(output).To(SatisfyAll(
MatchRegexp(`[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}`)))
})
})
Context("with a deployed app", func() {
XIt("can list app builds", func() {
})
XIt("can create a build from an existing image (\"deis pull\")", func() {
})
})
})
})