summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoman Melnikov <roman.melnikov@serokell.io>2023-05-10 13:36:03 +0800
committerRoman Melnikov <roman.melnikov@serokell.io>2023-05-10 16:26:20 +0800
commitda2c0a74ca7aa2472cf2bc819ce8af53530b3bd8 (patch)
treea1d73288721a9769d8c3ce3f0fb1d7a25ff67fd5 /tests
parent379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8 (diff)
buildkite-agent: update module
Update module to look it similar to what it currently present in 'nixpkgs'. Mainly, to provide support for running multiple buildkite-agents.
Diffstat (limited to 'tests')
-rw-r--r--tests/services-buildkite-agent.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/services-buildkite-agent.nix b/tests/services-buildkite-agent.nix
index 4ca89b8..557aad2 100644
--- a/tests/services-buildkite-agent.nix
+++ b/tests/services-buildkite-agent.nix
@@ -6,22 +6,21 @@ let
in
{
- services.buildkite-agent = {
+ services.buildkite-agents.test = {
enable = true;
package = buildkite-agent;
extraConfig = "yolo=1";
- openssh.privateKeyPath = "/dev/null";
- openssh.publicKeyPath = "/dev/null";
+ privateSshKeyPath = "/dev/null";
hooks.command = "echo test hook";
inherit tokenPath;
};
test = ''
- echo "checking buildkite-agent service in /Library/LaunchDaemons" >&2
- grep "org.nixos.buildkite-agent" ${config.out}/Library/LaunchDaemons/org.nixos.buildkite-agent.plist
+ echo "checking buildkite-agent-test service in /Library/LaunchDaemons" >&2
+ grep "org.nixos.buildkite-agent-test" ${config.out}/Library/LaunchDaemons/org.nixos.buildkite-agent-test.plist
echo "checking creation of buildkite-agent service config" >&2
- script=$(cat ${config.out}/Library/LaunchDaemons/org.nixos.buildkite-agent.plist | awk -F'[< ]' '$3 ~ "^/nix/store/.*" {print $3}')
+ script=$(cat ${config.out}/Library/LaunchDaemons/org.nixos.buildkite-agent-test.plist | awk -F'[< ]' '$3 ~ "^/nix/store/.*" {print $3}')
grep "yolo=1" "$script"
grep "${tokenPath}" "$script"