diff options
| author | tv <tv@krebsco.de> | 2026-11-13 21:28:11 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-13 21:28:11 +0100 |
| commit | d36d2e631e4baceed0a8c0c00859ebb2ab8cb82f (patch) | |
| tree | 98227d0091b8b23c0c69dcc3e5a770a0da291a37 /tests/default.nix | |
| parent | bcffc9b0a00f3c49db71fe61e8185b9b8e281e55 (diff) | |
populate: drop the shell implementation
Populate is the program in Rust only. pkgs.populate checks its arguments,
and returns a script running the program with them as JSON. The
arguments it took for the shell implementation, dash, jq, and
implementation, stay accepted and unused, so overrides setting them keep
working.
Copying flakes to remote targets using sudo gets refused during
evaluation, as before, by checks.nix, and by the program for specs from
elsewhere.
The jq test goes with the jq programs; the program's unit tests cover
their equivalents.
Diffstat (limited to 'tests/default.nix')
| -rw-r--r-- | tests/default.nix | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/tests/default.nix b/tests/default.nix index 189e573..97b64e0 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -7,10 +7,8 @@ # -A exhaustive, or one with, e.g., nix-build tests -A exhaustive.flake. # The smoke test runs a few scenarios covering each source type and each kind # of target in a single VM test, for checking changes quickly; build it with -# nix-build tests -A smoke. jq runs populate's jq programs for flakes without -# VMs. implementation selects populate's implementation, e.g. nix-build -# tests --argstr implementation rust -A smoke. -{ pkgs ? import ../pkgs {}, implementation ? "shell" }: +# nix-build tests -A smoke. +{ pkgs ? import ../pkgs {} }: let # HEAD of /fixtures/gitsrc, which fixtures.sh creates deterministically, @@ -26,11 +24,11 @@ let # The scenarios, with populate using rsync. scenariosWith = rsync: let - populate = pkgs.populate.override { inherit implementation rsync; }; + populate = pkgs.populate.override { inherit rsync; }; in import ./scenarios.nix { inherit (pkgs) lib; krops = import ../lib; - inherit implementation populate; + inherit populate; inherit (pkgs.krops.override { inherit populate; }) writeDeploy; url = "http://deployer:8000"; gitUrl = "git://deployer/gitsrc.git"; @@ -40,7 +38,6 @@ let rsyncVersion = rsync.version; }; scenarios = scenariosWith pkgs.rsync; - flakeJq = import ../pkgs/populate/flake-jq.nix; # VM tests of those of the groups of scenarios that are, or aren't, # exhaustive, named after the groups with prefix in front. testsOf = exhaustive: prefix: pkgs.lib.mapAttrs @@ -109,18 +106,3 @@ in }; }) rsyncs - // { - # Lock files in the shapes different versions of Nix write. - jq = pkgs.runCommand "krops-jq" { - nativeBuildInputs = [ pkgs.jq pkgs.nix ]; - } '' - sh ${./jq.sh} ${pkgs.linkFarm "krops-flake-jq" (map - (name: { name = "${name}.jq"; path = pkgs.writeText "${name}.jq" flakeJq.${name}; }) - [ "selected" "selfIsRemote" "selfLocked" ] - ++ [{ - name = "metadataSubdir.nix"; - path = pkgs.writeText "metadataSubdir.nix" flakeJq.metadataSubdir; - }])} - touch $out - ''; - } |
