mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nixosTests.jenkins: port to python
This commit is contained in:
parent
4572821435
commit
dde45712a7
@ -3,7 +3,7 @@
|
||||
# 2. jenkins user can be extended on both master and slave
|
||||
# 3. jenkins service not started on slave node
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "jenkins";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ bjornfor coconnor domenkozar eelco ];
|
||||
@ -33,18 +33,17 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$master->waitForUnit("jenkins");
|
||||
master.wait_for_unit("jenkins")
|
||||
|
||||
$master->mustSucceed("curl http://localhost:8080 | grep 'Authentication required'");
|
||||
assert "Authentication required" in master.succeed("curl http://localhost:8080")
|
||||
|
||||
print $master->execute("sudo -u jenkins groups");
|
||||
$master->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
|
||||
for host in master, slave:
|
||||
groups = host.succeed("sudo -u jenkins groups")
|
||||
assert "jenkins" in groups
|
||||
assert "users" in groups
|
||||
|
||||
print $slave->execute("sudo -u jenkins groups");
|
||||
$slave->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
|
||||
|
||||
$slave->mustFail("systemctl is-enabled jenkins.service");
|
||||
slave.fail("systemctl is-enabled jenkins.service")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user