Fix test runner for tests without vars
This commit is contained in:
@@ -37,7 +37,6 @@ nixosLib.runTest (
|
|||||||
testScript = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
server.wait_for_unit("network-online.target")
|
|
||||||
server.wait_for_unit("maddy")
|
server.wait_for_unit("maddy")
|
||||||
|
|
||||||
# imap
|
# imap
|
||||||
|
|||||||
@@ -73,10 +73,12 @@ in
|
|||||||
${self.legacyPackages.${hostPkgs.system}.setupNixInNix}
|
${self.legacyPackages.${hostPkgs.system}.setupNixInNix}
|
||||||
cp -r ${testSrc} ./src
|
cp -r ${testSrc} ./src
|
||||||
chmod +w -R ./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
|
find ./src/sops ./src/vars | sort > filesBefore
|
||||||
${update-vars-script} ./src ${testName} \
|
${update-vars-script} ./src ${testName} \
|
||||||
--repo-root ${self.packages.${hostPkgs.system}.clan-core-flake} \
|
--repo-root ${self.packages.${hostPkgs.system}.clan-core-flake} \
|
||||||
--clean
|
--clean
|
||||||
|
mkdir -p ./src/sops ./src/vars
|
||||||
find ./src/sops ./src/vars | sort > filesAfter
|
find ./src/sops ./src/vars | sort > filesAfter
|
||||||
if ! diff -q filesBefore filesAfter; then
|
if ! diff -q filesBefore filesAfter; then
|
||||||
echo "The update-vars script changed the files in ${testSrc}."
|
echo "The update-vars script changed the files in ${testSrc}."
|
||||||
|
|||||||
Reference in New Issue
Block a user