github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/integration/v7/push/disk_flag_test.go (about) 1 package push 2 3 import ( 4 "code.cloudfoundry.org/cli/integration/helpers" 5 . "github.com/onsi/ginkgo" 6 . "github.com/onsi/gomega" 7 . "github.com/onsi/gomega/gbytes" 8 . "github.com/onsi/gomega/gexec" 9 ) 10 11 var _ = Describe("push with disk flag", func() { 12 var ( 13 appName string 14 ) 15 16 BeforeEach(func() { 17 appName = helpers.NewAppName() 18 }) 19 20 Context("when the -k flag is provided with application disk", func() { 21 It("creates the app with the specified disk", func() { 22 helpers.WithHelloWorldApp(func(dir string) { 23 session := helpers.CustomCF(helpers.CFEnv{WorkingDirectory: dir}, 24 PushCommandName, appName, 25 "-k", "70M", 26 ) 27 Eventually(session).Should(Exit(0)) 28 }) 29 30 helpers.WaitForAppDiskToTakeEffect(appName, 0, 0, false, "70M") 31 32 session := helpers.CF("app", appName) 33 Eventually(session).Should(Exit(0)) 34 Expect(session).To(Say(`name:\s+%s`, appName)) 35 Expect(session).To(Say(`last uploaded:\s+%s`, helpers.ReadableDateTimeRegex)) 36 Expect(session).To(Say(`\s+state\s+since\s+cpu\s+memory\s+disk`)) 37 Expect(session).To(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 }) 39 }) 40 })