Implement nixos-modules/static-page test
All checks were successful
CI / build (push) Successful in 4m9s
All checks were successful
CI / build (push) Successful in 4m9s
This commit is contained in:
parent
c3962b9738
commit
c9844276b8
8 changed files with 124 additions and 4 deletions
45
checks/nixos-modules/static-page/default.nix
Normal file
45
checks/nixos-modules/static-page/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
testers,
|
||||
curl,
|
||||
lib,
|
||||
gnugrep,
|
||||
...
|
||||
}:
|
||||
testers.runNixOSTest {
|
||||
name = "static-page";
|
||||
|
||||
nodes.webserver =
|
||||
{ ... }:
|
||||
{
|
||||
# Service under test
|
||||
imports = [ ../../../nixos-modules/static-page ];
|
||||
qois.static-page = {
|
||||
enable = true;
|
||||
pages = lib.mkForce {
|
||||
"localhost" = {
|
||||
domainAliases = [ "example.com" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Test environment
|
||||
environment.systemPackages = [
|
||||
curl
|
||||
gnugrep
|
||||
];
|
||||
# Disable TLS services
|
||||
services.nginx.virtualHosts =
|
||||
let
|
||||
tlsOff = {
|
||||
forceSSL = lib.mkForce false;
|
||||
enableACME = lib.mkForce false;
|
||||
};
|
||||
in
|
||||
{
|
||||
"localhost" = tlsOff;
|
||||
"example.com" = tlsOff;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = lib.readFile ./test.py;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue