Commit 8f7ea812 authored by Robert Hensing's avatar Robert Hensing Committed by github-actions[bot]
Browse files

hercules-ci-agent: Improve passthru tests

(cherry picked from commit 0d405840)
parent 8d7f712c
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -22,10 +22,31 @@ in pkg.overrideAttrs (o: {
    };
    passthru = o.passthru // {
      # Does not test the package, but evaluation of the related NixOS module.
      tests.nixos-minimal-config = nixos {
      tests.nixos-simple-config = (nixos {
        boot.loader.grub.enable = false;
        fileSystems."/".device = "bogus";
        services.hercules-ci-agent.enable = true;
        # Dummy value for testing only.
        system.stateVersion = lib.trivial.release; # TEST ONLY
      }).config.system.build.toplevel;

      tests.nixos-many-options-config = (nixos ({ pkgs, ... }: {
        boot.loader.grub.enable = false;
        fileSystems."/".device = "bogus";
        services.hercules-ci-agent = {
          enable = true;
          package = pkgs.hercules-ci-agent;
          settings = {
            workDirectory = "/var/tmp/hci";
            binaryCachesPath = "/var/keys/binary-caches.json";
            labels.foo.bar.baz = "qux";
            labels.qux = ["q" "u"];
            apiBaseUrl = "https://hci.dev.biz.example.com";
            concurrentTasks = 42;
          };
        };
        # Dummy value for testing only.
        system.stateVersion = lib.trivial.release; # TEST ONLY
      })).config.system.build.toplevel;
    };
  })