summary refs log tree commit diff
path: root/nixos/tests/mongodb.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/mongodb.nix')
-rw-r--r--nixos/tests/mongodb.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/tests/mongodb.nix b/nixos/tests/mongodb.nix
index 0ccbeb062f9..9ebf84eed23 100644
--- a/nixos/tests/mongodb.nix
+++ b/nixos/tests/mongodb.nix
@@ -1,6 +1,6 @@
 # This test start mongodb, runs a query using mongo shell
 
-import ./make-test.nix ({ pkgs, ...} : let
+import ./make-test-python.nix ({ pkgs, ...} : let
   testQuery = pkgs.writeScript "nixtest.js" ''
     db.greetings.insert({ "greeting": "hello" });
     print(db.greetings.findOne().greeting);
@@ -33,8 +33,10 @@ in {
     };
 
   testScript = ''
-    startAll;
-    $one->waitForUnit("mongodb.service");
-    $one->succeed("mongo -u nixtest -p nixtest nixtest ${testQuery}") =~ /hello/ or die;
+    start_all()
+    one.wait_for_unit("mongodb.service")
+    one.succeed(
+        "mongo -u nixtest -p nixtest nixtest ${testQuery} | grep -q hello"
+    )
   '';
 })