mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
25bef2d8f9
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
32 lines
879 B
Nix
32 lines
879 B
Nix
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
{
|
|
name = "buildkite-agent";
|
|
meta = with pkgs.lib.maintainers; {
|
|
maintainers = [ flokli ];
|
|
};
|
|
|
|
machine = { pkgs, ... }: {
|
|
services.buildkite-agents = {
|
|
one = {
|
|
privateSshKeyPath = (import ./ssh-keys.nix pkgs).snakeOilPrivateKey;
|
|
tokenPath = (pkgs.writeText "my-token" "5678");
|
|
};
|
|
two = {
|
|
tokenPath = (pkgs.writeText "my-token" "1234");
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
# 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-one/buildkite-agent.cfg")
|
|
machine.wait_for_file("/var/lib/buildkite-agent-one/.ssh/id_rsa")
|
|
|
|
machine.wait_for_file("/var/lib/buildkite-agent-two/buildkite-agent.cfg")
|
|
'';
|
|
})
|