diff options
author | Florian Klink <flokli@flokli.de> | 2019-11-24 01:38:24 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-24 01:38:24 +0100 |
commit | 39e8f9a31281be04563e0993915b610024cdba60 (patch) | |
tree | 43fff08061b601fc2a81ac4d444921e32ad11d02 /nixos/tests/etcd.nix | |
parent | d95112aa733e81533128e3f7b65b3a9dbe7a0642 (diff) | |
download | nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar.gz nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar.bz2 nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar.lz nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar.xz nixlib-39e8f9a31281be04563e0993915b610024cdba60.tar.zst nixlib-39e8f9a31281be04563e0993915b610024cdba60.zip |
nixosTests.etcd: port to python
Diffstat (limited to 'nixos/tests/etcd.nix')
-rw-r--r-- | nixos/tests/etcd.nix | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/nixos/tests/etcd.nix b/nixos/tests/etcd.nix index 6c23b31779bc..842724343841 100644 --- a/nixos/tests/etcd.nix +++ b/nixos/tests/etcd.nix @@ -1,6 +1,6 @@ # This test runs simple etcd node -import ./make-test.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ pkgs, ... } : { name = "etcd"; meta = with pkgs.stdenv.lib.maintainers; { @@ -14,14 +14,12 @@ import ./make-test.nix ({ pkgs, ... } : { }; testScript = '' - subtest "should start etcd node", sub { - $node->start(); - $node->waitForUnit("etcd.service"); - }; + with subtest("should start etcd node"): + node.start() + node.wait_for_unit("etcd.service") - subtest "should write and read some values to etcd", sub { - $node->succeed("etcdctl set /foo/bar 'Hello world'"); - $node->succeed("etcdctl get /foo/bar | grep 'Hello world'"); - } + with subtest("should write and read some values to etcd"): + node.succeed("etcdctl set /foo/bar 'Hello world'") + node.succeed("etcdctl get /foo/bar | grep 'Hello world'") ''; }) |