github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/integration/isolated/create_space_quota_command_test.go (about) 1 package isolated 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("create-space-quota command", func() { 12 BeforeEach(func() { 13 setupCF(ReadOnlyOrg, ReadOnlySpace) 14 }) 15 16 It("creates a space quota", func() { 17 quotaName := helpers.QuotaName() 18 totalMemory := "24M" 19 instanceMemory := "6M" 20 routes := "8" 21 serviceInstances := "2" 22 appInstances := "3" 23 reservedRoutePorts := "1" 24 session := helpers.CF("create-space-quota", quotaName, "-m", totalMemory, "-i", instanceMemory, "-r", routes, "-s", serviceInstances, "-a", appInstances, "--allow-paid-service-plans", "--reserved-route-ports", reservedRoutePorts) 25 Eventually(session).Should(Say("Creating space quota %s", quotaName)) 26 Eventually(session).Should(Exit(0)) 27 28 session = helpers.CF("space-quota", quotaName) 29 Eventually(session).Should(Say("total memory limit\\s+%s", totalMemory)) 30 Eventually(session).Should(Say("instance memory limit\\s+%s", instanceMemory)) 31 Eventually(session).Should(Say("routes\\s+%s", routes)) 32 Eventually(session).Should(Say("services\\s+%s", serviceInstances)) 33 //TODO: uncomment when #134821331 is complete 34 //Eventually(session).Should(Say("paid service plans\\s+%s", "allowed")) 35 Eventually(session).Should(Say("app instance limit\\s+%s", appInstances)) 36 Eventually(session).Should(Say("reserved route ports\\s+%s", reservedRoutePorts)) 37 Eventually(session).Should(Exit(0)) 38 }) 39 })