Unverified Commit b76c36dc authored by Leona Maroni's avatar Leona Maroni
Browse files

nixos/tests/acme: introduce new test nginx without reload

parent 69e93f65
Loading
Loading
Loading
Loading
+33 −21
Original line number Diff line number Diff line
{ runTest }:
{ lib, runTest }:
let
  domain = "example.test";
in
{
  http01-builtin = runTest ./http01-builtin.nix;
  dns01 = runTest ./dns01.nix;
  caddy = runTest ./caddy.nix;
  nginx = runTest (
    import ./webserver.nix {
      inherit domain;
      serverName = "nginx";
      group = "nginx";
      baseModule = {
  nginxBaseModule = {
    services.nginx = {
      enable = true;
          enableReload = true;
      logError = "stderr info";
      # This tests a number of things at once:
      #   - Self-signed certs are in place before the webserver startup
@@ -32,6 +21,29 @@ in
      services.nginx.virtualHosts."nullroot.${domain}".acmeFallbackHost = "localhost:8081";
    };
  };
in
{
  http01-builtin = runTest ./http01-builtin.nix;
  dns01 = runTest ./dns01.nix;
  caddy = runTest ./caddy.nix;
  nginx = runTest (
    import ./webserver.nix {
      inherit domain;
      serverName = "nginx";
      group = "nginx";
      baseModule = lib.recursiveUpdate nginxBaseModule {
        services.nginx.enableReload = true;
      };
    }
  );
  nginx-without-reload = runTest (
    import ./webserver.nix {
      inherit domain;
      serverName = "nginx";
      group = "nginx";
      baseModule = lib.recursiveUpdate nginxBaseModule {
        services.nginx.enableReload = false;
      };
    }
  );
  httpd = runTest (
+1 −0
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ stdenv.mkDerivation {
        ;
      variants = lib.recurseIntoAttrs nixosTests.nginx-variants;
      acme-integration = nixosTests.acme.nginx;
      acme-integration-without-reload = nixosTests.acme.nginx-without-reload;
    }
    // passthru.tests;
  };