From 939cfbf5e64d56044486f2719fca2f9a324e6766 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sun, 21 Jul 2024 04:18:30 +0200 Subject: [PATCH] fix(tests): Try to fix tests but still failing --- tests/default.nix | 8 +++----- tests/upstream-cache-http-directory.nix | 4 ++-- tests/upstream-cache-tvix.nix | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/default.nix b/tests/default.nix index b133aec..bb95d52 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -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 { }; } diff --git a/tests/upstream-cache-http-directory.nix b/tests/upstream-cache-http-directory.nix index 0b72719..7b997f7 100644 --- a/tests/upstream-cache-http-directory.nix +++ b/tests/upstream-cache-http-directory.nix @@ -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"): diff --git a/tests/upstream-cache-tvix.nix b/tests/upstream-cache-tvix.nix index 6988b46..284c88c 100644 --- a/tests/upstream-cache-tvix.nix +++ b/tests/upstream-cache-tvix.nix @@ -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"):