Merge pull request #145301 from lovesegfault/fix-vm-test-misc

This commit is contained in:
Bernardo Meurer 2021-11-09 22:42:42 -08:00 committed by GitHub
commit 7a8d1c2e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,17 +50,18 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
def get_path_info(path):
result = machine.succeed(f"nix path-info --json {path}")
result = machine.succeed(f"nix --option experimental-features nix-command path-info --json {path}")
parsed = json.loads(result)
return parsed
with subtest("nix-db"):
info = get_path_info("${foo}")
print(info)
if (
info[0]["narHash"]
!= "sha256:0afw0d9j1hvwiz066z93jiddc33nxg6i6qyp26vnqyglpyfivlq5"
!= "sha256-BdMdnb/0eWy3EddjE83rdgzWWpQjfWPAj3zDIFMD3Ck="
):
raise Exception("narHash not set")