diff --git a/tests/integration_tests/reporting/test_webhook_reporting.py b/tests/integration_tests/reporting/test_webhook_reporting.py index ba5336efa114..60d9bb5386fe 100644 --- a/tests/integration_tests/reporting/test_webhook_reporting.py +++ b/tests/integration_tests/reporting/test_webhook_reporting.py @@ -6,9 +6,11 @@ import pytest +from cloudinit import lifecycle from tests.integration_tests.instances import IntegrationInstance from tests.integration_tests.util import ( ASSETS_DIR, + get_feature_flag_value, verify_clean_boot, verify_clean_log, ) @@ -51,7 +53,18 @@ def test_webhook_reporting(client: IntegrationInstance): "cloud-init status --wait" ) verify_clean_log(client.read_from_file("/var/log/cloud-init.log")) - verify_clean_boot(client) + version_boundary = get_feature_flag_value( + client, "DEPRECATION_INFO_BOUNDARY" + ) + message = "Unsupported configuration: boot stage called by PID" + deprecation_messages = [] + if lifecycle.should_log_deprecation("24.3", version_boundary): + deprecation_messages.append(message) + else: + assert client.execute( + f"grep 'INFO]: {message}' /var/log/cloud-init.log" + ).stdout.strip(), f"Did not find expected log: {message}" + verify_clean_boot(client, require_deprecations=deprecation_messages) server_output = client.read_from_file( "/var/tmp/echo_server_output"