From 83ebe45f20d3c734fb1d346b1505b589a9a085da Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Tue, 7 Dec 2021 23:13:31 -0800 Subject: [PATCH] integration-tests/apply: Test GC root creation --- integration-tests/apply/test-script.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/integration-tests/apply/test-script.py b/integration-tests/apply/test-script.py index 35daee9..71233c0 100644 --- a/integration-tests/apply/test-script.py +++ b/integration-tests/apply/test-script.py @@ -7,7 +7,7 @@ deployer.succeed(f"sed -i 's|@poison@|{poison}|g' /tmp/bundle/hive.nix") targets = [alpha, beta, gamma] logs = deployer.succeed("cd /tmp/bundle &&" \ - f"run-copy-stderr {colmena} apply --eval-node-limit 4 --on @target") + f"run-copy-stderr {colmena} apply --eval-node-limit 4 --on @target --keep-result") with subtest("Check that evaluation messages were logged correctly"): assert "must appear during evaluation" in logs @@ -21,6 +21,12 @@ with subtest("Check that push messages were logged correctly"): with subtest("Check that activation messages were logged correctly"): assert "must appear during activation" in logs +with subtest("Check that GC roots are created correctly"): + for node in targets: + profile = node.succeed("readlink /run/current-system") + gcroot = deployer.succeed(f"readlink /tmp/bundle/.gcroots/node-{node.name}") + assert gcroot == profile + with subtest("Check that we can still connect to the target nodes"): for node in targets: deployer.succeed(f"ssh {node.name} true")