aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-05-15 14:38:10 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-05-15 14:38:10 +0200
commit5f64655ff429be08aa0787761697787e7050f373 (patch)
tree7e556119ceab59852e1392fd4112e83719b7bb8a /tests
parent849d3968dbe8c18651e1a7fbf071fc3304257517 (diff)
Move registry-related commands from 'nix flake' to 'nix registry'
This makes 'nix flake' less cluttered and more consistent (it's only subcommands that operator on a flake). Also, the registry is not inherently flake-related (e.g. fetchTree could also use it to remap inputs).
Diffstat (limited to 'tests')
-rw-r--r--tests/flakes.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 1b234c992..d28beb486 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -151,7 +151,7 @@ cat > $registry <<EOF
EOF
# Test 'nix flake list'.
-[[ $(nix flake list | wc -l) == 6 ]]
+[[ $(nix registry list | wc -l) == 6 ]]
# Test 'nix flake info'.
nix flake info flake1 | grep -q 'URL: .*flake1.*'
@@ -264,10 +264,10 @@ git -C $flake3Dir add flake.lock
git -C $flake3Dir commit -m 'Add lockfile'
# Test whether registry caching works.
-nix flake list --flake-registry file://$registry | grep -q flake3
+nix registry list --flake-registry file://$registry | grep -q flake3
mv $registry $registry.tmp
nix-store --gc
-nix flake list --flake-registry file://$registry --refresh | grep -q flake3
+nix registry list --flake-registry file://$registry --refresh | grep -q flake3
mv $registry.tmp $registry
# Test whether flakes are registered as GC roots for offline use.
@@ -391,12 +391,12 @@ git -C $flake3Dir checkout master
nix build -o $TEST_ROOT/result flake4/removeXyzzy#sth
# Testing the nix CLI
-nix flake add flake1 flake3
-[[ $(nix flake list | wc -l) == 7 ]]
-nix flake pin flake1
-[[ $(nix flake list | wc -l) == 7 ]]
-nix flake remove flake1
-[[ $(nix flake list | wc -l) == 6 ]]
+nix registry add flake1 flake3
+[[ $(nix registry list | wc -l) == 7 ]]
+nix registry pin flake1
+[[ $(nix registry list | wc -l) == 7 ]]
+nix registry remove flake1
+[[ $(nix registry list | wc -l) == 6 ]]
# Test 'nix flake init'.
(cd $flake7Dir && nix flake init)