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