fix(tests): Try to fix tests but still failing

This commit is contained in:
sinavir 2024-07-21 04:18:30 +02:00
parent 40846d3b16
commit 939cfbf5e6
3 changed files with 8 additions and 10 deletions

View file

@ -8,9 +8,7 @@
# ingest = pkgs.callPackage ./ingest.nix { };
multi-cache = pkgs.callPackage ./multi-cache.nix { };
substitution = pkgs.callPackage ./substitution.nix { };
upstream-cache = {
tvix = pkgs.callPackage ./upstream-cache-tvix.nix { };
http-directory = pkgs.callPackage ./upstream-cache-http-directory.nix { };
nix-serve = pkgs.callPackage ./upstream-cache-nix-serve.nix { };
};
upstream-cache-tvix = pkgs.callPackage ./upstream-cache-tvix.nix { };
upstream-cache-http-directory = pkgs.callPackage ./upstream-cache-http-directory.nix { };
upstream-cache-nix-serve = pkgs.callPackage ./upstream-cache-nix-serve.nix { };
}

View file

@ -69,9 +69,9 @@ pkgs.testers.runNixOSTest (_: {
cache.succeed("nix store sign -k ${./cache-keys/privkey} ${hello}")
cache.succeed("nix copy --to file:///srv ${hello}")
narHash = "${hello}"[11:11+32]
out = cache.succeed(f"curl -f 'http://127.0.0.1/upstream/{narHash}.narinfo'")
out = cache.succeed(f"curl -f 'http://localhost/upstream/{narHash}.narinfo'")
print(out)
cache.succeed(f"curl -f 'http://127.0.0.1/cache/{narHash}.narinfo'")
cache.succeed(f"curl -f 'http://localhost/cache/{narHash}.narinfo'")
with subtest("Try to substitute from cache"):
delete_and_substitute()
with subtest("Check effective caching"):

View file

@ -66,10 +66,10 @@ pkgs.testers.runNixOSTest (_: {
with subtest("Upload"):
cache.succeed("nix store sign -k ${./cache-keys/privkey} ${hello}")
cache.succeed("nix copy --to 'http://127.0.0.1/upstream/?compression=none' ${hello}")
cache.succeed("nix copy --to 'http://localhost/upstream/?compression=none' ${hello}")
narHash = "${hello}"[11:11+32]
cache.succeed(f"curl -f 'http://127.0.0.1/upstream/{narHash}.narinfo'")
cache.succeed(f"curl -f 'http://127.0.0.1/cache/{narHash}.narinfo'")
cache.succeed(f"curl -f 'http://localhost/upstream/{narHash}.narinfo'")
cache.succeed(f"curl -f 'http://localhost/cache/{narHash}.narinfo'")
with subtest("Try to substitute from cache"):
delete_and_substitute()
with subtest("Check effective caching"):