@@ -2,16 +2,42 @@ package _tests_test
22
33import (
44 . "github.com/onsi/ginkgo"
5- // . "github.com/onsi/gomega"
5+ . "github.com/onsi/gomega"
66)
77
88var _ = Describe ("Config" , func () {
99 Context ("with a deployed app" , func () {
10+ appName := getRandAppName ()
11+ BeforeEach (func () {
12+ login (url , testUser , testPassword )
13+ })
14+
15+ It ("can create a new app" , func () {
16+ output , err := execute ("deis apps:create %s" , appName )
17+ Expect (err ).NotTo (HaveOccurred ())
18+ Expect (output ).To (SatisfyAll (
19+ ContainSubstring ("Creating Application... done, created %s" , appName ),
20+ ContainSubstring ("Git remote deis added" ),
21+ ContainSubstring ("remote available at " )))
22+ })
1023
11- XIt ("can list environment variables" , func () {
12- // "deis config:set FOO=bar--app=%s"
24+ It ("can list environment variables" , func () {
25+ out , err := execute ("deis config:set FOO=bar -a=%s" , appName )
26+ Expect (err ).NotTo (HaveOccurred ())
27+ Expect (out ).To (SatisfyAll (
28+ ContainSubstring ("Creating config... done" ),
29+ ContainSubstring ("FOO bar" ),
30+ ContainSubstring ("=== %s Config" , appName ),
31+ ))
32+ out , err = execute ("deis config:list --a=%s" , appName )
33+ Expect (err ).NotTo (HaveOccurred ())
34+ Expect (out ).To (SatisfyAll (
35+ ContainSubstring ("=== %s Config" , appName ),
36+ ContainSubstring ("FOO bar" ),
37+ ))
38+ // TODO: the following won't work as-is because there is no app running
1339 // "deis run env --app=%s"
14- // "deis config:list --app=%s"
40+
1541 })
1642
1743 XIt ("can set an integer environment variable" , func () {
0 commit comments