summaryrefslogtreecommitdiffstats
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
parenta067458d6529828c837207819856516876779c85 (diff)
nixosTests.riak: port to python
-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 68a9b7315b35..01baf656d145 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")
'';
-}
+})