From 4ce0b64e9ad645429fd35aec34287e5c625adb23 Mon Sep 17 00:00:00 2001 From: Connor Prussin Date: Fri, 27 Jan 2023 13:43:12 -0700 Subject: [PATCH] Fix test Co-authored-by: Zhaofeng Li --- integration-tests/apply/test-script.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integration-tests/apply/test-script.py b/integration-tests/apply/test-script.py index 81f4b80..2e3c28b 100644 --- a/integration-tests/apply/test-script.py +++ b/integration-tests/apply/test-script.py @@ -68,11 +68,14 @@ with subtest("Check that key files have correct permissions"): for path, permission in permissions.items(): node.succeed(f"if [[ \"{permission}\" != \"$(stat -c '%a %U %G' '{path}')\" ]]; then ls -lah '{path}'; exit 1; fi") +with subtest("Check that the key service is started for post-activation keys"): + alpha.wait_for_unit("post-activation-key.service") + with subtest("Check that key services respond to key file changes"): - alpha.require_unit_state("key-text-key.service", "active") + alpha.wait_for_unit("key-text-key.service") alpha.succeed("rm /run/keys/key-text") - alpha.wait_until_succeeds("systemctl --no-pager show key-text-key.service | grep ActiveState=inactive", timeout=10) + alpha.require_unit_state("key-text-key.service", "activating") alpha.succeed("touch /run/keys/key-text") alpha.wait_for_unit("key-text-key.service")