nixosTests.buildkite: add test
This commit is contained in:
parent
70308a7daf
commit
a208e6eb99
@ -33,6 +33,7 @@ in
|
|||||||
bind = handleTest ./bind.nix {};
|
bind = handleTest ./bind.nix {};
|
||||||
bittorrent = handleTest ./bittorrent.nix {};
|
bittorrent = handleTest ./bittorrent.nix {};
|
||||||
#blivet = handleTest ./blivet.nix {}; # broken since 2017-07024
|
#blivet = handleTest ./blivet.nix {}; # broken since 2017-07024
|
||||||
|
buildkite-agent = handleTest ./buildkite-agent.nix {};
|
||||||
boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64
|
boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64
|
||||||
boot-stage1 = handleTest ./boot-stage1.nix {};
|
boot-stage1 = handleTest ./boot-stage1.nix {};
|
||||||
borgbackup = handleTest ./borgbackup.nix {};
|
borgbackup = handleTest ./borgbackup.nix {};
|
||||||
|
23
nixos/tests/buildkite-agent.nix
Normal file
23
nixos/tests/buildkite-agent.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "buildkite-agent";
|
||||||
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
|
maintainers = [ flokli ];
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { pkgs, ... }: {
|
||||||
|
services.buildkite-agent = {
|
||||||
|
enable = true;
|
||||||
|
privateSshKeyPath = (import ./ssh-keys.nix pkgs).snakeOilPrivateKey;
|
||||||
|
tokenPath = (pkgs.writeText "my-token" "5678");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
# we can't wait on the unit to start up, as we obviously can't connect to buildkite,
|
||||||
|
# but we can look whether files are set up correctly
|
||||||
|
machine.wait_for_file("/var/lib/buildkite-agent/buildkite-agent.cfg")
|
||||||
|
machine.wait_for_file("/var/lib/buildkite-agent/.ssh/id_rsa")
|
||||||
|
'';
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user