1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
nixpkgs/nixos/tests/etcd.nix

28 lines
598 B
Nix
Raw Normal View History

# This test runs simple etcd node
2014-11-15 15:27:27 +00:00
import ./make-test.nix ({ pkgs, ... } : {
name = "etcd";
2014-11-15 15:27:27 +00:00
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ offline ];
};
2014-11-15 15:27:27 +00:00
nodes = {
node = { ... }: {
services.etcd.enable = true;
2014-11-15 15:27:27 +00:00
};
};
2014-11-15 15:27:27 +00:00
testScript = ''
subtest "should start etcd node", sub {
$node->start();
$node->waitForUnit("etcd.service");
};
2014-11-15 15:27:27 +00:00
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'");
}
2014-11-15 15:27:27 +00:00
'';
})