This commit enables the parametrization for "legacy-combined" protocol. All failing tests with that have been either fixed or disabled. Notably: - A couple of tests (e.g. involving builders) could be made to work with a non-local store, but this would require some refactoring to testlib in order to make certain configuration settings generic over local and remote operations. We've disabled those for now, in order to make progress - The store tests all run locally only because of their nature - The flakes tests also all run locally only because my energy for fixing them is limited (and it's a *lot* of test failures, with probably little overall benefit in terms of test coverage) Change-Id: I56fa249a64f7c17c952f688ec89e9687f2a13f12
29 lines
945 B
Python
29 lines
945 B
Python
from fnmatch import fnmatch
|
|
from testlib.fixtures.git import Git
|
|
from testlib.fixtures.nix import Nix
|
|
from testlib.fixtures.file_helper import with_files
|
|
from testlib.utils import get_global_asset_pack
|
|
from pathlib import Path
|
|
from .common import simple_flake
|
|
|
|
import pytest
|
|
|
|
pytestmark = pytest.mark.no_daemon
|
|
|
|
|
|
@with_files({"flake-container": get_global_asset_pack(".git") | {"flake-dir": simple_flake()}})
|
|
def test_subdir_flake(nix: Nix, files: Path, git: Git):
|
|
container = files / "flake-container"
|
|
flake = container / "flake-dir"
|
|
|
|
nix.settings.add_xp_feature("nix-command", "flakes")
|
|
|
|
git(container, "add", "flake-dir")
|
|
|
|
info = nix.nix(["flake", "info", "--json"], cwd=flake).run().json()
|
|
|
|
assert fnmatch(info["resolvedUrl"], "git+file://*/flake-container[?]dir=flake-dir")
|
|
assert fnmatch(info["url"], "git+file://*/flake-container[?]dir=flake-dir")
|
|
|
|
nix.nix(["build", f"path:{flake}#foo", "-L"]).run().ok()
|