Files
clan-core/clanServices/wifi/tests/vm/default.nix
DavHau a0cbc815e8 makeTestClan: simplify - move parameters into module
... in preparation of removing the makeTestClan wrapper and make this a module instead that can be imported into any test.
2025-06-03 19:38:02 +07:00

44 lines
855 B
Nix

{
pkgs,
self,
clanLib,
module,
...
}:
clanLib.test.makeTestClan {
inherit pkgs self;
nixosTest = (
{ ... }:
{
name = "wifi-service";
clan = {
directory = ./.;
test.useContainers = false;
modules."@clan/wifi" = module;
inventory = {
machines.test = { };
instances = {
wg-test-one = {
module.name = "@clan/wifi";
roles.default.machines = {
test.settings.networks.one = { };
};
};
};
};
};
testScript = ''
start_all()
test.wait_for_unit("NetworkManager.service")
psk = test.succeed("cat /run/NetworkManager/system-connections/one.nmconnection")
assert "password-eins" in psk, "Password is incorrect"
'';
}
);
}