From 2886e81c14dfd39a95c53728cd1252d4048c3561 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Tue, 17 May 2022 08:21:34 -0500 Subject: [PATCH 1/2] testing: make fake cloud-init wait actually wait --- tests/integration_tests/cmd/test_status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/cmd/test_status.py b/tests/integration_tests/cmd/test_status.py index 53bab5fd6ba..f75e7094d9a 100644 --- a/tests/integration_tests/cmd/test_status.py +++ b/tests/integration_tests/cmd/test_status.py @@ -14,7 +14,11 @@ def _wait_for_cloud_init(client: IntegrationInstance): for _ in range(30): try: result = client.execute("cloud-init status --long") - if result and result.ok: + if ( + result + and result.ok + and ("running" not in result or "not run" not in result) + ): return result except Exception as e: last_exception = e From c99687e3920ddcc1ce6823bc5a0408d186984430 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Tue, 17 May 2022 09:09:02 -0500 Subject: [PATCH 2/2] comments --- tests/integration_tests/cmd/test_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_tests/cmd/test_status.py b/tests/integration_tests/cmd/test_status.py index f75e7094d9a..ced883fdd04 100644 --- a/tests/integration_tests/cmd/test_status.py +++ b/tests/integration_tests/cmd/test_status.py @@ -13,7 +13,7 @@ def _wait_for_cloud_init(client: IntegrationInstance): last_exception = None for _ in range(30): try: - result = client.execute("cloud-init status --long") + result = client.execute("cloud-init status") if ( result and result.ok