diff options
author | Shawn Warren <shawn.warren@rackspace.com> | 2016-07-22 17:29:18 -0500 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2016-07-23 00:29:18 +0200 |
commit | 9886c80daa8c5601f3a6de2a1512d00435da3432 (patch) | |
tree | 10b9e34c1ae379950faac330278cd76a9b755023 /nixos/tests/gocd-agent.nix | |
parent | c4c378b6138ac224f2de13ecf172a760104dae3e (diff) |
Add gocd agent and server service packages (#16273)
GoCD is an open source continuous delivery server specializing in advanced workflow
modeling and visualization. Update maintainers list to include swarren83. Update
module list to include gocd agent and server module. Update packages list to include
gocd agent and server package. Update version, revision and checksum for GoCD
release 16.5.0.
Diffstat (limited to 'nixos/tests/gocd-agent.nix')
-rw-r--r-- | nixos/tests/gocd-agent.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/tests/gocd-agent.nix b/nixos/tests/gocd-agent.nix new file mode 100644 index 000000000000..d5ed0f65ab01 --- /dev/null +++ b/nixos/tests/gocd-agent.nix @@ -0,0 +1,34 @@ +# verifies: +# 1. GoCD agent starts +# 2. GoCD agent responds +# 3. GoCD agent is available on GoCD server using GoCD API +# 3.1. https://api.go.cd/current/#get-all-agents + +import ./make-test.nix ({ pkgs, ...} : { + name = "gocd-agent"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ swarren83 ]; + }; + +nodes = { + gocd_agent = + { config, pkgs, ... }: + { + virtualisation.memorySize = 2048; + services.gocd-agent = { + enable = true; + }; + services.gocd-server = { + enable = true; + }; + }; +}; + + testScript = '' + startAll; + $gocd_agent->waitForUnit("gocd-server"); + $gocd_agent->waitForOpenPort("8153"); + $gocd_agent->waitForUnit("gocd-agent"); + $gocd_agent->waitUntilSucceeds("curl -s -f localhost:8153/go/api/agents -H 'Accept: application/vnd.go.cd.v2+json'"); + ''; +}) |