✅ improve verify flake module
This commit is contained in:
parent
9ae95ddb11
commit
61eaadba3d
2 changed files with 6 additions and 6 deletions
|
@ -173,7 +173,6 @@
|
|||
++ [
|
||||
./machines/${name}/configuration.nix
|
||||
nix-topology.nixosModules.default
|
||||
self.nixosModules.verify
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -415,6 +414,7 @@
|
|||
name = "cherry";
|
||||
host = "cherry.bear";
|
||||
modules = [
|
||||
self.nixosModules.verify
|
||||
zerotierModules
|
||||
nixos-hardware.nixosModules.framework-13th-gen-intel
|
||||
retiolum.nixosModules.retiolum
|
||||
|
@ -436,6 +436,7 @@
|
|||
name = "chungus";
|
||||
host = "chungus.bear";
|
||||
modules = [
|
||||
self.nixosModules.verify
|
||||
zerotierModules
|
||||
zerotierControllerModule
|
||||
homeManagerModules
|
||||
|
@ -457,6 +458,7 @@
|
|||
host = "orbi.bear";
|
||||
#host = "95.216.66.212";
|
||||
modules = [
|
||||
self.nixosModules.verify
|
||||
homeManagerModules
|
||||
stylixModules
|
||||
zerotierModules
|
||||
|
|
|
@ -53,21 +53,19 @@ with types;
|
|||
if ${curl} -s -o /dev/null -w "%{http_code}" ${url} | ${grep} -q "${toString responseCode}"; then
|
||||
if ${curl} -s ${url} | ${grep} -q "${expectedContent}"; then
|
||||
echo -n ""
|
||||
#echo " [ OK ] Die Seite hat Statuscode ${toString responseCode} und enthält den String '${expectedContent}'."
|
||||
else
|
||||
echo " [Fail] Der Statuscode ist 200, aber die Seite enthält den String '${expectedContent}' nicht."
|
||||
echo " [Fail] ${url} did return ${toString responseCode}, but did not contain the string '${expectedContent}'."
|
||||
fi
|
||||
else
|
||||
echo " [Fail] Die Seite hat keinen Statuscode ${toString responseCode}."
|
||||
echo " [Fail] ${url} did not return ${toString responseCode}."
|
||||
fi
|
||||
'';
|
||||
|
||||
scriptWithoutExpectedContent = url: responseCode: ''
|
||||
if ${curl} -s -o /dev/null -w "%{http_code}" ${url} | ${grep} -q "${toString responseCode}"; then
|
||||
echo -n ""
|
||||
#echo " [ OK ] Die Seite hat Statuscode ${toString responseCode}."
|
||||
else
|
||||
echo " [Fail] Die Seite hat keinen Statuscode ${toString responseCode}."
|
||||
echo " [Fail] ${url} did not return ${toString responseCode}."
|
||||
fi
|
||||
'';
|
||||
script =
|
||||
|
|
Loading…
Reference in a new issue