Loading nixos/tests/ncps-ha-pg-redis.nix +0 −27 Original line number Diff line number Diff line Loading @@ -163,25 +163,6 @@ in testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ (builtins.head nodes.minio.services.minio.dataDir) bucket "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName "xl.meta" ]; in '' harmonia.start() minio.start() Loading @@ -206,13 +187,5 @@ in client0.wait_until_succeeds("curl -f http://ncps0:8501/ | grep '\"hostname\":\"${toString nodes.ncps0.services.ncps.cache.hostName}\"' >&2") client1.wait_until_succeeds("curl -f http://ncps1:8501/ | grep '\"hostname\":\"${toString nodes.ncps1.services.ncps.cache.hostName}\"' >&2") client0.succeed("cat /etc/nix/nix.conf >&2") client0.succeed("nix-store --realise ${pkgs.emptyFile}") client1.succeed("cat /etc/nix/nix.conf >&2") client1.succeed("nix-store --realise ${pkgs.emptyFile}") minio.succeed("cat ${narinfoPath} >&2") ''; } nixos/tests/ncps-ha-pg.nix +0 −27 Original line number Diff line number Diff line Loading @@ -145,25 +145,6 @@ in testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ (builtins.head nodes.minio.services.minio.dataDir) bucket "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName "xl.meta" ]; in '' harmonia.start() minio.start() Loading @@ -184,13 +165,5 @@ in client0.wait_until_succeeds("curl -f http://ncps0:8501/ | grep '\"hostname\":\"${toString nodes.ncps0.services.ncps.cache.hostName}\"' >&2") client1.wait_until_succeeds("curl -f http://ncps1:8501/ | grep '\"hostname\":\"${toString nodes.ncps1.services.ncps.cache.hostName}\"' >&2") client0.succeed("cat /etc/nix/nix.conf >&2") client0.succeed("nix-store --realise ${pkgs.emptyFile}") client1.succeed("cat /etc/nix/nix.conf >&2") client1.succeed("nix-store --realise ${pkgs.emptyFile}") minio.succeed("cat ${narinfoPath} >&2") ''; } nixos/tests/ncps.nix +4 −18 Original line number Diff line number Diff line Loading @@ -63,23 +63,6 @@ testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ nodes.ncps.services.ncps.cache.storage.local "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName ]; in '' start_all() Loading @@ -92,6 +75,9 @@ client.succeed("cat /etc/nix/nix.conf >&2") client.succeed("nix-store --realise ${pkgs.emptyFile}") ncps.succeed("cat ${narinfoPath} >&2") # Verify that the NAR file exists in the cache storage # We query the NAR hash from the client and then check if a file with that hash exists in the ncps storage nar_hash = client.succeed("nix-store -q --hash ${pkgs.emptyFile}").strip().split(":")[1] ncps.succeed(f"find ${nodes.ncps.services.ncps.cache.storage.local} -type f | grep {nar_hash}") ''; } Loading
nixos/tests/ncps-ha-pg-redis.nix +0 −27 Original line number Diff line number Diff line Loading @@ -163,25 +163,6 @@ in testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ (builtins.head nodes.minio.services.minio.dataDir) bucket "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName "xl.meta" ]; in '' harmonia.start() minio.start() Loading @@ -206,13 +187,5 @@ in client0.wait_until_succeeds("curl -f http://ncps0:8501/ | grep '\"hostname\":\"${toString nodes.ncps0.services.ncps.cache.hostName}\"' >&2") client1.wait_until_succeeds("curl -f http://ncps1:8501/ | grep '\"hostname\":\"${toString nodes.ncps1.services.ncps.cache.hostName}\"' >&2") client0.succeed("cat /etc/nix/nix.conf >&2") client0.succeed("nix-store --realise ${pkgs.emptyFile}") client1.succeed("cat /etc/nix/nix.conf >&2") client1.succeed("nix-store --realise ${pkgs.emptyFile}") minio.succeed("cat ${narinfoPath} >&2") ''; }
nixos/tests/ncps-ha-pg.nix +0 −27 Original line number Diff line number Diff line Loading @@ -145,25 +145,6 @@ in testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ (builtins.head nodes.minio.services.minio.dataDir) bucket "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName "xl.meta" ]; in '' harmonia.start() minio.start() Loading @@ -184,13 +165,5 @@ in client0.wait_until_succeeds("curl -f http://ncps0:8501/ | grep '\"hostname\":\"${toString nodes.ncps0.services.ncps.cache.hostName}\"' >&2") client1.wait_until_succeeds("curl -f http://ncps1:8501/ | grep '\"hostname\":\"${toString nodes.ncps1.services.ncps.cache.hostName}\"' >&2") client0.succeed("cat /etc/nix/nix.conf >&2") client0.succeed("nix-store --realise ${pkgs.emptyFile}") client1.succeed("cat /etc/nix/nix.conf >&2") client1.succeed("nix-store --realise ${pkgs.emptyFile}") minio.succeed("cat ${narinfoPath} >&2") ''; }
nixos/tests/ncps.nix +4 −18 Original line number Diff line number Diff line Loading @@ -63,23 +63,6 @@ testScript = { nodes, ... }: let narinfoName = (lib.strings.removePrefix "/nix/store/" ( lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath )) + ".narinfo"; narinfoNameChars = lib.strings.stringToCharacters narinfoName; narinfoPath = lib.concatStringsSep "/" [ nodes.ncps.services.ncps.cache.storage.local "store/narinfo" (lib.lists.elemAt narinfoNameChars 0) ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1)) narinfoName ]; in '' start_all() Loading @@ -92,6 +75,9 @@ client.succeed("cat /etc/nix/nix.conf >&2") client.succeed("nix-store --realise ${pkgs.emptyFile}") ncps.succeed("cat ${narinfoPath} >&2") # Verify that the NAR file exists in the cache storage # We query the NAR hash from the client and then check if a file with that hash exists in the ncps storage nar_hash = client.succeed("nix-store -q --hash ${pkgs.emptyFile}").strip().split(":")[1] ncps.succeed(f"find ${nodes.ncps.services.ncps.cache.storage.local} -type f | grep {nar_hash}") ''; }