github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/integration/isolated/set_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("set-space-quota command", func() { 12 var ( 13 orgName string 14 spaceName string 15 quotaName string 16 ) 17 BeforeEach(func() { 18 orgName = helpers.NewOrgName() 19 spaceName = helpers.PrefixedRandomName("SPACE") 20 21 setupCF(orgName, spaceName) 22 quotaName = helpers.QuotaName() 23 session := helpers.CF("create-space-quota", quotaName) 24 Eventually(session).Should(Exit(0)) 25 }) 26 27 It("sets the space quota on a space", func() { 28 session := helpers.CF("set-space-quota", spaceName, quotaName) 29 Eventually(session).Should(Say("Assigning space quota %s to space %s", quotaName, spaceName)) 30 Eventually(session).Should(Exit(0)) 31 32 session = helpers.CF("space", spaceName) 33 Eventually(session).Should(Say("Space Quota:\\s+%s", quotaName)) 34 Eventually(session).Should(Exit(0)) 35 }) 36 })