summaryrefslogtreecommitdiff
path: root/tests/integration_tests/modules/test_power_state_change.py
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2020-12-10 10:58:12 -0600
committerGitHub <noreply@github.com>2020-12-10 11:58:12 -0500
commit97bfd21d2dca978a662c87f0255a2a2bb97fc5d6 (patch)
tree646a8d58333171a974ae29bfef0bc2684ff750bb /tests/integration_tests/modules/test_power_state_change.py
parent1d1649e56e553576240cf4b1fafc098997b9ba6d (diff)
downloadvyos-cloud-init-97bfd21d2dca978a662c87f0255a2a2bb97fc5d6.tar.gz
vyos-cloud-init-97bfd21d2dca978a662c87f0255a2a2bb97fc5d6.zip
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.
Diffstat (limited to 'tests/integration_tests/modules/test_power_state_change.py')
-rw-r--r--tests/integration_tests/modules/test_power_state_change.py5
1 files changed, 2 insertions, 3 deletions
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'))