|
1 | 1 | package _tests_test |
2 | 2 |
|
3 | 3 | import ( |
| 4 | + "fmt" |
| 5 | + |
4 | 6 | . "github.com/onsi/ginkgo" |
5 | | - // . "github.com/onsi/gomega" |
| 7 | + . "github.com/onsi/gomega" |
6 | 8 | ) |
7 | 9 |
|
8 | 10 | 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 | + }) |
10 | 16 |
|
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 | + }) |
13 | 34 | }) |
14 | 35 |
|
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 | + }) |
21 | 44 | }) |
| 45 | + |
22 | 46 | }) |
23 | 47 | }) |
0 commit comments