github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/integration/v7/push/disk_flag_test.go (about) 1 package push 2 3 import ( 4 "time" 5 6 "code.cloudfoundry.org/cli/integration/helpers" 7 . "github.com/onsi/ginkgo" 8 . "github.com/onsi/gomega" 9 . "github.com/onsi/gomega/gbytes" 10 . "github.com/onsi/gomega/gexec" 11 ) 12 13 var _ = Describe("push with disk flag", func() { 14 var ( 15 appName string 16 ) 17 18 BeforeEach(func() { 19 appName = helpers.NewAppName() 20 }) 21 22 Context("when the -k flag is provided with application disk", func() { 23 It("creates the app with the specified disk", func() { 24 helpers.WithHelloWorldApp(func(dir string) { 25 session := helpers.CustomCF(helpers.CFEnv{WorkingDirectory: dir}, 26 PushCommandName, appName, 27 "-k", "70M", 28 ) 29 Eventually(session).Should(Exit(0)) 30 }) 31 32 time.Sleep(5 * time.Second) 33 session := helpers.CF("app", appName) 34 Eventually(session).Should(Say(`name:\s+%s`, appName)) 35 Eventually(session).Should(Say(`last uploaded:\s+%s`, helpers.ReadableDateTimeRegex)) 36 Eventually(session).Should(Say(`\s+state\s+since\s+cpu\s+memory\s+disk`)) 37 Eventually(session).Should(Say(`#0\s+running\s+\d{4}-[01]\d-[0-3]\dT[0-2][0-9]:[0-5]\d:[0-5]\dZ.+of.+of 70M`)) 38 Eventually(session).Should(Exit(0)) 39 }) 40 }) 41 })