nixosTests.rabbitmq: port to python

This commit is contained in:
Oleksii Filonenko 2019-11-25 11:35:19 +02:00
parent a067458d65
commit 248a3de948
No known key found for this signature in database
GPG Key ID: F3510FE5691629A1

View File

@ -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"'
)
'';
})