From 6465a56d38f59bd339685942806972a8d4f1f379 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:44:51 +0100 Subject: [PATCH 1/3] nixos/metabase: port test to python --- nixos/tests/metabase.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/tests/metabase.nix b/nixos/tests/metabase.nix index be9e5ed5b1e..1450a4e9086 100644 --- a/nixos/tests/metabase.nix +++ b/nixos/tests/metabase.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "metabase"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ mmahut ]; @@ -12,9 +12,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("metabase.service"); - $machine->waitForOpenPort(3000); - $machine->waitUntilSucceeds("curl -L http://localhost:3000/setup | grep Metabase"); + start_all() + machine.wait_for_unit("metabase.service") + machine.wait_for_open_port(3000) + machine.wait_until_succeeds("curl -L http://localhost:3000/setup | grep Metabase") ''; }) From 5768950f01998d67bc03405c03e4a20535976462 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:45:02 +0100 Subject: [PATCH 2/3] nixos/trac: port test to python --- nixos/tests/trac.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix index 643095d947e..7953f8d41f7 100644 --- a/nixos/tests/trac.nix +++ b/nixos/tests/trac.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "trac"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ mmahut ]; @@ -11,9 +11,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("trac.service"); - $machine->waitForOpenPort(8000); - $machine->waitUntilSucceeds("curl -L http://localhost:8000/ | grep 'Trac Powered'"); + start_all() + machine.wait_for_unit("trac.service") + machine.wait_for_open_port(8000) + machine.wait_until_succeeds("curl -L http://localhost:8000/ | grep 'Trac Powered'") ''; }) From 23340a21b6e42fe211da33d5531038fed94179a3 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:45:12 +0100 Subject: [PATCH 3/3] nixos/trezord: port test to python --- nixos/tests/trezord.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/trezord.nix b/nixos/tests/trezord.nix index 1c85bf53934..8d908a52249 100644 --- a/nixos/tests/trezord.nix +++ b/nixos/tests/trezord.nix @@ -1,7 +1,7 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "trezord"; meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ mmahut ]; + maintainers = [ mmahut "1000101" ]; }; nodes = { @@ -12,9 +12,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("trezord.service"); - $machine->waitForOpenPort(21325); - $machine->waitUntilSucceeds("curl -L http://localhost:21325/status/ | grep Version"); + start_all() + machine.wait_for_unit("trezord.service") + machine.wait_for_open_port(21325) + machine.wait_until_succeeds("curl -L http://localhost:21325/status/ | grep Version") ''; })