aboutsummaryrefslogtreecommitdiffstats
path: root/tests/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/default.nix')
-rw-r--r--tests/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/default.nix b/tests/default.nix
new file mode 100644
index 0000000..e9ea769
--- /dev/null
+++ b/tests/default.nix
@@ -0,0 +1,24 @@
+# NixOS VM tests for populate, one test per source type, plus one for
+# features spanning sources. Build all with nix-build tests, or one with,
+# e.g., nix-build tests -A flake.
+{ pkgs ? import ../pkgs {} }:
+
+let
+ # HEAD of /fixtures/gitsrc, which fixtures.sh creates deterministically.
+ # fixtures.sh fails if it differs, naming the actual one.
+ gitHead = "e42d44ef9cdb76ba5a84dff4c89c38222703bf0c";
+
+ scenarios = import ./scenarios.nix {
+ inherit (pkgs) lib;
+ krops = import ../lib;
+ inherit (pkgs) populate;
+ url = "http://deployer:8000";
+ gitUrl = "git://deployer/gitsrc.git";
+ remoteHost = "target";
+ agePath = "${pkgs.age}/bin/age";
+ inherit gitHead;
+ };
+in
+ builtins.mapAttrs
+ (name: scenarios: import ./vm.nix { inherit pkgs name scenarios gitHead; })
+ scenarios