1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00
nixpkgs/nixos/tests/jenkins-cli.nix
Pamplemousse 4f093b8fdb nixos/modules/jenkins: Test the CLI
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-04 14:49:39 -07:00

31 lines
632 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : rec {
name = "jenkins-cli";
meta = with pkgs.lib.maintainers; {
maintainers = [ pamplemousse ];
};
nodes = {
machine =
{ ... }:
{
services.jenkins = {
enable = true;
withCLI = true;
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("jenkins")
assert "JENKINS_URL" in machine.succeed("env")
assert "http://0.0.0.0:8080" in machine.succeed("echo $JENKINS_URL")
machine.succeed(
"jenkins-cli -auth admin:$(cat /var/lib/jenkins/secrets/initialAdminPassword)"
)
'';
})