Files
lix/tests/functional2/eval/test_symlink_resoultion.py
T
eldritch horrors f5b9f105e2 libstore: drop Store::connect
there's no reason a store should not open a connection during init if it
needs to open any connection to function. delaying connection setup like
this makes openStore less deterministic and graceful fallback impossible

this caused test failures where the old behaviour was required to ensure
test output stability. because of course something like that must happen

Change-Id: I946adddee026f1f4c74b4699d730b4d1ac9a5072
2026-07-17 18:00:14 +00:00

27 lines
915 B
Python

from collections.abc import Callable
from pathlib import Path
import pytest
from testlib.fixtures.file_helper import with_files, File, AssetSymlink, Symlink
from testlib.fixtures.nix import Nix
from testlib.fixtures.snapshot import Snapshot
pytestmark = pytest.mark.no_daemon
@with_files(
{
"in.nix": File("import symlink-resolution/foo/overlays/overlay.nix"),
"out.exp": AssetSymlink("assets/symlink-resolution.out.exp"),
"symlink-resolution": {
"foo": {"lib": {"default.nix": File('"test"')}, "overlays": Symlink("../overlays")},
"overlays": {"overlay.nix": File("import ../lib")},
},
}
)
def test_symlink_resolution(nix: Nix, files: Path, snapshot: Callable[[str], Snapshot]):
res = nix.nix_instantiate(["--eval", "--strict", files / "in.nix"]).run().ok()
assert snapshot("out.exp") == res.stdout_plain
assert not res.stderr_plain