Fix test runner for tests without vars

This commit is contained in:
pinpox
2025-06-03 22:33:27 +02:00
parent 65af5ac5d2
commit 11fd796d44
2 changed files with 2 additions and 1 deletions

View File

@@ -37,7 +37,6 @@ nixosLib.runTest (
testScript = ''
start_all()
server.wait_for_unit("network-online.target")
server.wait_for_unit("maddy")
# imap

View File

@@ -73,10 +73,12 @@ in
${self.legacyPackages.${hostPkgs.system}.setupNixInNix}
cp -r ${testSrc} ./src
chmod +w -R ./src
mkdir -p ./src/sops ./src/vars # create dirs case the test has no vars
find ./src/sops ./src/vars | sort > filesBefore
${update-vars-script} ./src ${testName} \
--repo-root ${self.packages.${hostPkgs.system}.clan-core-flake} \
--clean
mkdir -p ./src/sops ./src/vars
find ./src/sops ./src/vars | sort > filesAfter
if ! diff -q filesBefore filesAfter; then
echo "The update-vars script changed the files in ${testSrc}."