github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/integration/shared/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  		helpers.LoginCF()
    14  		helpers.TargetOrgAndSpace(ReadOnlyOrg, ReadOnlySpace)
    15  	})
    16  
    17  	It("creates a space quota", func() {
    18  		quotaName := helpers.QuotaName()
    19  		totalMemory := "24M"
    20  		instanceMemory := "6M"
    21  		routes := "8"
    22  		serviceInstances := "2"
    23  		appInstances := "3"
    24  		reservedRoutePorts := "1"
    25  		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)
    26  		Eventually(session).Should(Say("Creating space quota %s", quotaName))
    27  		Eventually(session).Should(Exit(0))
    28  
    29  		session = helpers.CF("space-quota", quotaName)
    30  		Eventually(session).Should(Say(`total memory limit\s+%s`, totalMemory))
    31  		Eventually(session).Should(Say(`instance memory limit\s+%s`, instanceMemory))
    32  		Eventually(session).Should(Say(`routes\s+%s`, routes))
    33  		Eventually(session).Should(Say(`services\s+%s`, serviceInstances))
    34  		//TODO: uncomment when #134821331 is complete
    35  		//Eventually(session).Should(Say(`paid service plans\s+%s`, "allowed"))
    36  		Eventually(session).Should(Say(`app instance limit\s+%s`, appInstances))
    37  		Eventually(session).Should(Say(`reserved route ports\s+%s`, reservedRoutePorts))
    38  		Eventually(session).Should(Exit(0))
    39  	})
    40  })