github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/integration/v6/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.NewSpaceName()
    20  
    21  		helpers.SetupCF(orgName, spaceName)
    22  		quotaName = helpers.QuotaName()
    23  		session := helpers.CF("create-space-quota", quotaName)
    24  		Eventually(session).Should(Exit(0))
    25  	})
    26  
    27  	AfterEach(func() {
    28  		helpers.QuickDeleteOrg(orgName)
    29  	})
    30  
    31  	It("sets the space quota on a space", func() {
    32  		session := helpers.CF("set-space-quota", spaceName, quotaName)
    33  		Eventually(session).Should(Say("Assigning space quota %s to space %s", quotaName, spaceName))
    34  		Eventually(session).Should(Exit(0))
    35  
    36  		session = helpers.CF("space", spaceName)
    37  		Eventually(session).Should(Say(`(?i)space quota:\s+%s`, quotaName))
    38  		Eventually(session).Should(Exit(0))
    39  	})
    40  })