nixosTests.etcd: handleTest -> runTest
This commit is contained in:
parent
5df085c57a
commit
969bed3f90
@ -473,7 +473,7 @@ in
|
|||||||
activation-etc-overlay-mutable = runTest ./activation/etc-overlay-mutable.nix;
|
activation-etc-overlay-mutable = runTest ./activation/etc-overlay-mutable.nix;
|
||||||
activation-etc-overlay-immutable = runTest ./activation/etc-overlay-immutable.nix;
|
activation-etc-overlay-immutable = runTest ./activation/etc-overlay-immutable.nix;
|
||||||
activation-perlless = runTest ./activation/perlless.nix;
|
activation-perlless = runTest ./activation/perlless.nix;
|
||||||
etcd = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./etcd/etcd.nix { };
|
etcd = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./etcd/etcd.nix;
|
||||||
etcd-cluster = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./etcd/etcd-cluster.nix { };
|
etcd-cluster = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./etcd/etcd-cluster.nix { };
|
||||||
etebase-server = runTest ./etebase-server.nix;
|
etebase-server = runTest ./etebase-server.nix;
|
||||||
etesync-dav = runTest ./etesync-dav.nix;
|
etesync-dav = runTest ./etesync-dav.nix;
|
||||||
|
@ -1,30 +1,22 @@
|
|||||||
# This test runs simple etcd node
|
# This test runs simple etcd node
|
||||||
import ../make-test-python.nix (
|
{ lib, ... }:
|
||||||
{ pkgs, ... }:
|
{
|
||||||
{
|
name = "etcd";
|
||||||
name = "etcd";
|
meta.maintainers = with lib.maintainers; [ offline ];
|
||||||
meta = with pkgs.lib.maintainers; {
|
|
||||||
maintainers = [ offline ];
|
|
||||||
};
|
|
||||||
|
|
||||||
nodes = {
|
nodes.node = {
|
||||||
node =
|
services.etcd.enable = true;
|
||||||
{ ... }:
|
};
|
||||||
{
|
|
||||||
services.etcd.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
with subtest("should start etcd node"):
|
with subtest("should start etcd node"):
|
||||||
node.start()
|
node.start()
|
||||||
node.wait_for_unit("etcd.service")
|
node.wait_for_unit("etcd.service")
|
||||||
# Add additional wait for actual readiness
|
# Add additional wait for actual readiness
|
||||||
node.wait_until_succeeds("etcdctl endpoint health")
|
node.wait_until_succeeds("etcdctl endpoint health")
|
||||||
|
|
||||||
with subtest("should write and read some values to etcd"):
|
with subtest("should write and read some values to etcd"):
|
||||||
node.succeed("etcdctl put /foo/bar 'Hello world'")
|
node.succeed("etcdctl put /foo/bar 'Hello world'")
|
||||||
node.succeed("etcdctl get /foo/bar | grep 'Hello world'")
|
node.succeed("etcdctl get /foo/bar | grep 'Hello world'")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user