testing: migrate flakes/flakes.sh (part 14)

flake clone

Change-Id: I6697d109465eaededfb2ac8ee552b6ac971d2e8a
This commit is contained in:
eldritch horrors
2026-02-26 13:11:25 +00:00
parent f0f8117d5b
commit 2634585a48
2 changed files with 7 additions and 5 deletions
-5
View File
@@ -215,11 +215,6 @@ git -C $flake3Dir add flake.nix flake.lock
git -C $flake3Dir commit -m 'Remove packages.xyzzy'
git -C $flake3Dir checkout master
# Test 'nix flake clone'.
rm -rf $TEST_ROOT/flake1-v2
nix flake clone flake1 --dest $TEST_ROOT/flake1-v2
[ -e $TEST_ROOT/flake1-v2/flake.nix ]
# Test 'follows' inputs.
cat > $flake3Dir/flake.nix <<EOF
{
+7
View File
@@ -515,6 +515,13 @@ def test_flakes_gcroots(nix: Nix, flake1: Path, flake2: Path):
nix.nix(["build", f"git+file://{flake2}#bar", "--refresh"]).run().ok()
@pytest.mark.usefixtures("registry")
def test_flake_clone(nix: Nix):
dest = nix.env.dirs.home / "flake1-v2"
nix.nix(["flake", "clone", "flake1", "--dest", dest]).run().ok()
assert (dest / "flake.nix").exists()
@pytest.mark.usefixtures("registry")
class TestLock:
def test_path_url(self, nix: Nix, flake5: Path):