add integration test for worker
This commit is contained in:
parent
21a9864cd7
commit
19d2d512f0
|
@ -10,6 +10,7 @@
|
|||
in
|
||||
{
|
||||
master = import ./master.nix checkArgs;
|
||||
worker = import ./worker.nix checkArgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
21
nix/checks/worker.nix
Normal file
21
nix/checks/worker.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
(import ./lib.nix) {
|
||||
name = "from-nixos";
|
||||
nodes = {
|
||||
# `self` here is set by using specialArgs in `lib.nix`
|
||||
node1 = { self, config, pkgs, ... }: {
|
||||
imports = [
|
||||
self.nixosModules.buildbot-worker
|
||||
];
|
||||
services.buildbot-nix.worker = {
|
||||
enable = true;
|
||||
workerPasswordFile = pkgs.writeText "password" "password";
|
||||
};
|
||||
};
|
||||
};
|
||||
# This is the test code that will check if our service is running correctly:
|
||||
testScript = ''
|
||||
start_all()
|
||||
# wait for our service to start
|
||||
node1.wait_for_unit("buildbot-worker")
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue