Unverified Commit 5da922e0 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #315857 from mweinelt/misc-test-pathinfo-variants

nixos/tests/misc: support old and new path-info output structure
parents 52d36196 903f315f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -73,16 +73,19 @@ let


        with subtest("nix-db"):
            info = get_path_info("${foo}")
            out = "${foo}"
            info = get_path_info(out)
            print(info)

            pathinfo = info[0] if isinstance(info, list) else info[out]

            if (
                info[0]["narHash"]
                pathinfo["narHash"]
                != "sha256-BdMdnb/0eWy3EddjE83rdgzWWpQjfWPAj3zDIFMD3Ck="
            ):
                raise Exception("narHash not set")

            if info[0]["narSize"] != 128:
            if pathinfo["narSize"] != 128:
                raise Exception("narSize not set")

        with subtest("nixos-version"):