colmena/integration-tests/apply-local/default.nix

28 lines
660 B
Nix
Raw Normal View History

{ pkgs ? import ../nixpkgs.nix }:
2021-11-22 10:52:35 +01:00
let
tools = pkgs.callPackage ../tools.nix {
targets = [];
prebuiltTarget = "deployer";
extraDeployerConfig = {
users.users.colmena = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
security.sudo.wheelNeedsPassword = false;
};
};
in tools.runTest {
name = "colmena-apply-local";
2021-11-22 10:52:35 +01:00
colmena.test = {
bundle = ./.;
2021-11-22 10:52:35 +01:00
testScript = ''
deployer.succeed("cd /tmp/bundle && sudo -u colmena ${tools.colmenaExec} apply-local --sudo")
deployer.succeed("grep SUCCESS /etc/deployment")
deployer.succeed("grep SECRET /run/keys/key-text")
'';
};
2021-11-22 10:52:35 +01:00
}