summary refs log tree commit diff
path: root/nixos/tests/riak.nix
diff options
context:
space:
mode:
authorOleksii Filonenko <brightone@protonmail.com>2019-11-25 11:49:33 +0200
committerOleksii Filonenko <brightone@protonmail.com>2019-11-25 11:51:22 +0200
commitf5746f9c0b86a4cf197d4d6bd834940db865351a (patch)
treec44e5ef301fed67b750a39ae9e489a98529aa08f /nixos/tests/riak.nix
parenta067458d6529828c837207819856516876779c85 (diff)
downloadnixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar.gz
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar.bz2
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar.lz
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar.xz
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.tar.zst
nixpkgs-f5746f9c0b86a4cf197d4d6bd834940db865351a.zip
nixosTests.riak: port to python
Diffstat (limited to 'nixos/tests/riak.nix')
-rw-r--r--nixos/tests/riak.nix22
1 files changed, 8 insertions, 14 deletions
diff --git a/nixos/tests/riak.nix b/nixos/tests/riak.nix
index 68a9b7315b3..01baf656d14 100644
--- a/nixos/tests/riak.nix
+++ b/nixos/tests/riak.nix
@@ -1,21 +1,15 @@
-import ./make-test.nix {
+import ./make-test-python.nix ({ lib, pkgs, ... }: {
   name = "riak";
 
-  nodes = {
-    master =
-      { pkgs, ... }:
-
-      {
-        services.riak.enable = true;
-        services.riak.package = pkgs.riak;
-      };
+  machine = {
+    services.riak.enable = true;
+    services.riak.package = pkgs.riak;
   };
 
   testScript = ''
-    startAll;
+    machine.start()
 
-    $master->waitForUnit("riak");
-    $master->sleep(20); # Hopefully this is long enough!!
-    $master->succeed("riak ping 2>&1");
+    machine.wait_for_unit("riak")
+    machine.wait_until_succeeds("riak ping 2>&1")
   '';
-}
+})