From 97bfd21d2dca978a662c87f0255a2a2bb97fc5d6 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Thu, 10 Dec 2020 10:58:12 -0600 Subject: Integration test for LP: #1813396 and #669 (#719) Ensure gpg is called with --no-tty flag. Also, refactored the "ordered_items_in_text" to assert if the line is missing and provide a more useful error message. --- tests/integration_tests/modules/test_power_state_change.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/integration_tests/modules/test_power_state_change.py') diff --git a/tests/integration_tests/modules/test_power_state_change.py b/tests/integration_tests/modules/test_power_state_change.py index 60e0e583..844dccfa 100644 --- a/tests/integration_tests/modules/test_power_state_change.py +++ b/tests/integration_tests/modules/test_power_state_change.py @@ -9,7 +9,7 @@ import pytest from tests.integration_tests.clouds import IntegrationCloud from tests.integration_tests.instances import IntegrationInstance -from tests.integration_tests.log_utils import ordered_items_in_text +from tests.integration_tests.log_utils import verify_ordered_items_in_text USER_DATA = """\ #cloud-config @@ -80,8 +80,7 @@ class TestPowerChange: "running 'init-local'", 'config-power-state-change already ran', ] - assert ordered_items_in_text(lines_to_check, log), ( - 'Expected data not in logs') + verify_ordered_items_in_text(lines_to_check, log) @pytest.mark.user_data(USER_DATA.format(delay='0', mode='poweroff', timeout='0', condition='false')) -- cgit v1.2.3