aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/flakes/flakes.sh
diff options
context:
space:
mode:
authorOlmo Kramer <olmo@olmail.io>2024-05-31 13:21:16 -0700
committerjade <lix@jade.fyi>2024-06-03 21:50:33 +0000
commit72d85acba4ed3647e00aca829ae16ea10b83a9a4 (patch)
tree24a6fb64e21482c538f89ced16c12ab0046b736b /tests/functional/flakes/flakes.sh
parent5d3910330d91f89c190c2bd5fb9c93cc2e8989d1 (diff)
nix flake update: add test for multiple inputs from nix#10073
Upstream-PR: https://github.com/NixOS/nix/pull/10073 Change-Id: I53fcb43b387e55439e062e208877afeb88493bb4
Diffstat (limited to 'tests/functional/flakes/flakes.sh')
-rw-r--r--tests/functional/flakes/flakes.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh
index dfa088960..3ef518b23 100644
--- a/tests/functional/flakes/flakes.sh
+++ b/tests/functional/flakes/flakes.sh
@@ -485,6 +485,16 @@ nix flake lock $flake3Dir
nix flake update flake2/flake1 --flake "$flake3Dir"
[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
+# Test updating multiple inputs.
+nix flake lock "$flake3Dir" --override-input flake1 flake1/master/$hash1
+nix flake lock "$flake3Dir" --override-input flake2/flake1 flake1/master/$hash1
+[[ $(jq -r .nodes.flake1.locked.rev "$flake3Dir/flake.lock") =~ $hash1 ]]
+[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash1 ]]
+
+nix flake update flake1 flake2/flake1 --flake "$flake3Dir"
+[[ $(jq -r .nodes.flake1.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
+[[ $(jq -r .nodes.flake1_2.locked.rev "$flake3Dir/flake.lock") =~ $hash2 ]]
+
# Test 'nix flake metadata --json'.
nix flake metadata $flake3Dir --json | jq .