github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/integration/v7/push/log_rate_limit_flag_test.go (about)

     1  package push
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccversion"
     5  	"code.cloudfoundry.org/cli/integration/helpers"
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  	. "github.com/onsi/gomega/gexec"
     9  )
    10  
    11  var _ = Describe("push with log rate limit flag", func() {
    12  	var (
    13  		appName string
    14  	)
    15  
    16  	BeforeEach(func() {
    17  		helpers.SkipIfVersionLessThan(ccversion.MinVersionLogRateLimitingV3)
    18  
    19  		appName = helpers.NewAppName()
    20  	})
    21  
    22  	Context("when the -l flag is provided with application log rate limit", func() {
    23  		It("creates the app with the specified log rate limit", func() {
    24  			helpers.WithHelloWorldApp(func(dir string) {
    25  				session := helpers.CustomCF(helpers.CFEnv{WorkingDirectory: dir},
    26  					PushCommandName, appName,
    27  					"-l", "5K",
    28  				)
    29  				Eventually(session).Should(Exit(0))
    30  			})
    31  
    32  			helpers.WaitForLogRateLimitToTakeEffect(appName, 0, 0, false, "5K")
    33  		})
    34  	})
    35  })