✅ add some more smoke tests.
This commit is contained in:
parent
743a9fc885
commit
d0a34454d4
2 changed files with 20 additions and 2 deletions
|
@ -172,7 +172,7 @@
|
|||
++ [
|
||||
./machines/${name}/configuration.nix
|
||||
nix-topology.nixosModules.default
|
||||
#self.nixosModules.verify
|
||||
self.nixosModules.verify
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -462,7 +462,6 @@
|
|||
srvos.nixosModules.hardware-hetzner-online-intel
|
||||
#srvos.nixosModules.server
|
||||
#srvos.nixosModules.mixins-terminfo
|
||||
self.nixosModules.verify
|
||||
{
|
||||
home-manager.users.mainUser = import ./homes/palo;
|
||||
home-manager.users.root = import ./homes/root;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
nixos-artwork,
|
||||
...
|
||||
}:
|
||||
|
@ -29,6 +30,24 @@
|
|||
};
|
||||
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [ config.services.paperless.port ];
|
||||
verify.localCommands.paperless =
|
||||
let
|
||||
domain = "http://paperless.ingolf-wagner.de/accounts/login/?next=/";
|
||||
curl = lib.getExe pkgs.curl;
|
||||
grep = lib.getExe pkgs.gnugrep;
|
||||
grepString = "paperless.chungus.private";
|
||||
in
|
||||
''
|
||||
if ${curl} -s -o /dev/null -w "%{http_code}" ${domain} | ${grep} -q "200"; then
|
||||
if ${curl} -s ${domain} | ${grep} -q "${grepString}"; then
|
||||
echo "[ OK ] Die Seite hat Statuscode 200 und enthält den String '${grepString}'."
|
||||
else
|
||||
echo "[Fail] Der Statuscode ist 200, aber die Seite enthält den String '${grepString}' nicht."
|
||||
fi
|
||||
else
|
||||
echo "[Fail] Die Seite hat keinen Statuscode 200."
|
||||
fi
|
||||
'';
|
||||
|
||||
services.nginx.virtualHosts."paperless.${config.networking.hostName}.private" = {
|
||||
serverAliases = [ "paperless.ingolf-wagner.de" ];
|
||||
|
|
Loading…
Reference in a new issue