Files
clan-core/clanServices/hello-world/tests/vm/default.nix
2025-06-30 19:50:16 +07:00

27 lines
551 B
Nix

{
name = "service-hello-service";
clan = {
directory = ./.;
inventory = {
machines.peer1 = { };
instances."test" = {
module.name = "hello-service";
module.input = "self";
roles.peer.machines.peer1 = { };
};
};
};
testScript =
{ nodes, ... }:
''
start_all()
# peer1 should have the 'hello' file
value = peer1.succeed("cat ${nodes.peer1.clan.core.vars.generators.hello.files.hello.path}")
assert value.strip() == "Hello world from peer1", value
'';
}