Skip to content

Commit

Permalink
add nixos python test for nomad-autoscaler module
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Apr 7, 2021
1 parent 17d0336 commit 7371fa5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flake.nix
Expand Up @@ -54,5 +54,9 @@

})) // {
mkHashiStack = import ./lib/mk-hashi-stack.nix;
checks.x86_64-linux = import ./tests {
pkgs = self.legacyPackages.x86_64-linux;
lib = self.legacyPackages.x86_64-linux.lib;
};
};
}
16 changes: 16 additions & 0 deletions tests/default.nix
@@ -0,0 +1,16 @@
{ lib, pkgs, ... }:
{
testNomadAutoScaler = pkgs.nixosTest {
name = "nomad-autoscaler";

machine = { ... }: {
imports = [ ../modules/nomad-autoscaler.nix ];

services.nomad-autoscaler.enable = true;
};

testScript = ''
machine.systemctl("is-system-running --wait")
'';
};
}

0 comments on commit 7371fa5

Please sign in to comment.