Skip to content

Commit

Permalink
Tweak testScript
Browse files Browse the repository at this point in the history
  • Loading branch information
SFrijters committed Sep 9, 2024
1 parent 4f1c244 commit e9c911c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@
postfix.enable = true;
};

virtualisation.diskSize = 128;
virtualisation.diskSize = 128; # MB
};

testScript = ''
import sys
import time
start_all()
server.wait_for_unit("default.target")
Expand All @@ -58,13 +57,13 @@
mail = server.succeed("mail -p")
print(mail)
if "Subject: Logwatch for server" not in mail:
sys.exit(1)
raise Exception("Missing text 'Subject: Logwatch for server' in output of 'mail -p'")
if "unstable" not in "${self.packages.${system}.logwatch.version}":
if "Logwatch ${self.packages.${system}.logwatch.version}" not in mail:
sys.exit(1)
raise Exception("Missing text 'Logwatch ${self.packages.${system}.logwatch.version} in output of 'mail -p'")
else:
if "Logwatch ${self.packages.${system}.logwatch.src.rev}" not in mail:
sys.exit(1)
raise Exception("Missing text 'Logwatch ${self.packages.${system}.logwatch.src.rev} in output of 'mail -p'")
'';
};

Expand Down

0 comments on commit e9c911c

Please sign in to comment.