MCPcopy
hub / github.com/cloudfoundry/cli / WaitForAppMemoryToTakeEffect

Function WaitForAppMemoryToTakeEffect

integration/helpers/app.go:360–372  ·  view source on GitHub ↗
(appName string, processIndex int, instanceIndex int, shouldRestartFirst bool, expectedMemory string)

Source from the content-addressed store, hash-verified

358}
359
360func WaitForAppMemoryToTakeEffect(appName string, processIndex int, instanceIndex int, shouldRestartFirst bool, expectedMemory string) {
361 if shouldRestartFirst {
362 session := CF("restart", appName)
363 Eventually(session).Should(Exit(0))
364 }
365
366 Eventually(func() string {
367 session := CF("app", appName)
368 Eventually(session).Should(Exit(0))
369 appTable := ParseV3AppProcessTable(session.Out.Contents())
370 return appTable.Processes[processIndex].Instances[instanceIndex].Memory
371 }).Should(MatchRegexp(fmt.Sprintf(`\d+(\.\d+)?[BKMG]? of %s`, expectedMemory)))
372}
373
374func WaitForAppDiskToTakeEffect(appName string, processIndex int, instanceIndex int, shouldRestartFirst bool, expectedDisk string) {
375 if shouldRestartFirst {

Callers 1

Calls 2

CFFunction · 0.85
ParseV3AppProcessTableFunction · 0.85

Tested by

no test coverage detected