From 248a3de9485ef2c28ba5a8eeae9133374b1ef8fe Mon Sep 17 00:00:00 2001 From: Oleksii Filonenko Date: Mon, 25 Nov 2019 11:35:19 +0200 Subject: [PATCH] nixosTests.rabbitmq: port to python --- nixos/tests/rabbitmq.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/tests/rabbitmq.nix b/nixos/tests/rabbitmq.nix index bb5932c36417..8e7f34d06e32 100644 --- a/nixos/tests/rabbitmq.nix +++ b/nixos/tests/rabbitmq.nix @@ -1,21 +1,21 @@ # This test runs rabbitmq and checks if rabbitmq is up and running. -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "rabbitmq"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco offline ]; }; - nodes = { - one = { ... }: { - services.rabbitmq.enable = true; - }; + machine = { + services.rabbitmq.enable = true; }; testScript = '' - startAll; + machine.start() - $one->waitForUnit("rabbitmq.service"); - $one->waitUntilSucceeds("su -s ${pkgs.stdenv.shell} rabbitmq -c \"rabbitmqctl status\""); + machine.wait_for_unit("rabbitmq.service") + machine.wait_until_succeeds( + 'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"' + ) ''; })