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

26 lines
625 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;
};
};
2021-11-22 10:52:35 +01:00
in tools.makeTest {
name = "colmena-apply-local";
2021-11-22 10:52:35 +01:00
bundle = ./.;
testScript = ''
deployer.succeed("cd /tmp/bundle && sudo -u colmena ${tools.colmenaExec} apply-local --sudo")
2021-11-22 10:52:35 +01:00
deployer.succeed("grep SUCCESS /etc/deployment")
deployer.succeed("grep SECRET /run/keys/key-text")
2021-11-22 10:52:35 +01:00
'';
}