Files
clan-core/clanServices/wifi/tests/vm/default.nix
2025-05-31 16:16:09 +07:00

44 lines
844 B
Nix

{
pkgs,
self,
clanLib,
module,
...
}:
clanLib.test.makeTestClan {
inherit pkgs self;
useContainers = false;
nixosTest = (
{ ... }:
{
name = "wifi-service";
clan = {
directory = ./.;
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"
'';
}
);
}