From 56b953526ba201441a3e6229cf0e38a04c33d39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Wed, 4 Jun 2025 16:00:54 +0200 Subject: [PATCH] Deployment tests: Check status of services before deploying --- deployment/check/cli/nixosTest.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployment/check/cli/nixosTest.nix b/deployment/check/cli/nixosTest.nix index f08f246c..52defcf0 100644 --- a/deployment/check/cli/nixosTest.nix +++ b/deployment/check/cli/nixosTest.nix @@ -79,10 +79,16 @@ in ## and check that they are working properly. extraTestScript = '' + with subtest("Check the status of the services - there should be none"): + garage.fail("systemctl status garage.service") + mastodon.fail("systemctl status mastodon-web.service") + peertube.fail("systemctl status peertube.service") + pixelfed.fail("systemctl status phpfpm-pixelfed.service") + with subtest("Run deployment with no services enabled"): deployer.succeed("nixops4 apply check-deployment-cli-nothing --show-trace --no-interactive 1>&2") - with subtest("Check the status of the services - there should be none"): + with subtest("Check the status of the services - there should still be none"): garage.fail("systemctl status garage.service") mastodon.fail("systemctl status mastodon-web.service") peertube.fail("systemctl status peertube.service")