(appName string, processIndex int, instanceIndex int, shouldRestartFirst bool, expectedMemory string)
| 358 | } |
| 359 | |
| 360 | func 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 | |
| 374 | func WaitForAppDiskToTakeEffect(appName string, processIndex int, instanceIndex int, shouldRestartFirst bool, expectedDisk string) { |
| 375 | if shouldRestartFirst { |
no test coverage detected