nixosTests.ferretdb: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 21:35:56 +08:00
parent a5e74df22d
commit ab94f9518a
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
2 changed files with 5 additions and 12 deletions

View File

@ -486,7 +486,7 @@ in
fedimintd = runTest ./fedimintd.nix;
fenics = runTest ./fenics.nix;
ferm = runTest ./ferm.nix;
ferretdb = handleTest ./ferretdb.nix { };
ferretdb = import ./ferretdb.nix { inherit pkgs runTest; };
fider = runTest ./fider.nix;
filesender = runTest ./filesender.nix;
filebrowser = runTest ./filebrowser.nix;

View File

@ -1,10 +1,6 @@
{
system ? builtins.currentSystem,
pkgs ? import ../.. { inherit system; },
...
}:
{ runTest, pkgs }:
let
lib = pkgs.lib;
inherit (pkgs) lib;
testScript = ''
machine.start()
machine.wait_for_unit("ferretdb.service")
@ -12,10 +8,8 @@ let
machine.succeed("mongosh --eval 'use myNewDatabase;' --eval 'db.myCollection.insertOne( { x: 1 } );'")
'';
in
with import ../lib/testing-python.nix { inherit system; };
{
postgresql = makeTest {
postgresql = runTest {
inherit testScript;
name = "ferretdb-postgresql";
meta.maintainers = with lib.maintainers; [ julienmalka ];
@ -47,8 +41,7 @@ with import ../lib/testing-python.nix { inherit system; };
environment.systemPackages = with pkgs; [ mongosh ];
};
};
sqlite = makeTest {
sqlite = runTest {
inherit testScript;
name = "ferretdb-sqlite";
meta.maintainers = with lib.maintainers; [ julienmalka ];