github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/integration/v6/isolated/unset_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("unset-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  		session = helpers.CF("set-space-quota", spaceName, quotaName)
    27  		Eventually(session).Should(Exit(0))
    28  	})
    29  
    30  	AfterEach(func() {
    31  		helpers.QuickDeleteOrg(orgName)
    32  	})
    33  
    34  	It("unsets the space quota on a space", func() {
    35  		session := helpers.CF("unset-space-quota", spaceName, quotaName)
    36  		Eventually(session).Should(Say("Unassigning space quota %s from space %s", quotaName, spaceName))
    37  		Eventually(session).Should(Exit(0))
    38  
    39  		session = helpers.CF("space", spaceName, "-v")
    40  		Eventually(session).Should(Say(`"space_quota_definition_guid": null`))
    41  		Eventually(session).Should(Exit(0))
    42  	})
    43  })