From f8218178f7e080012114d272907fdfa8009d0a53 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 24 Nov 2019 22:49:10 +0100 Subject: [PATCH] nixosTests.gocd-server: port to python --- nixos/tests/gocd-server.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/nixos/tests/gocd-server.nix b/nixos/tests/gocd-server.nix index 80cf04ed640..20faf85a1cc 100644 --- a/nixos/tests/gocd-server.nix +++ b/nixos/tests/gocd-server.nix @@ -2,7 +2,7 @@ # 1. GoCD server starts # 2. GoCD server responds -import ./make-test.nix ({ pkgs, ...} : +import ./make-test-python.nix ({ pkgs, ...} : { name = "gocd-server"; @@ -10,19 +10,19 @@ import ./make-test.nix ({ pkgs, ...} : maintainers = [ swarren83 ]; }; -nodes = { - gocd_server = - { ... }: - { - virtualisation.memorySize = 2046; - services.gocd-server.enable = true; - }; -}; + nodes = { + server = + { ... }: + { + virtualisation.memorySize = 2046; + services.gocd-server.enable = true; + }; + }; testScript = '' - $gocd_server->start; - $gocd_server->waitForUnit("gocd-server"); - $gocd_server->waitForOpenPort("8153"); - $gocd_server->waitUntilSucceeds("curl -s -f localhost:8153/go"); + server.start() + server.wait_for_unit("gocd-server") + server.wait_for_open_port(8153) + server.wait_until_succeeds("curl -s -f localhost:8153/go") ''; })