nixpkgs/nixos/tests/rabbitmq.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
691 B
Nix
Raw Normal View History

# This test runs rabbitmq and checks if rabbitmq is up and running.
2019-11-25 09:35:19 +00:00
import ./make-test-python.nix ({ pkgs, ... }: {
2014-06-28 14:04:49 +00:00
name = "rabbitmq";
meta = with pkgs.lib.maintainers; {
maintainers = [ eelco offline ];
};
2022-03-20 23:15:30 +00:00
nodes.machine = {
services.rabbitmq = {
enable = true;
managementPlugin.enable = true;
};
2021-08-02 13:23:07 +00:00
# Ensure there is sufficient extra disk space for rabbitmq to be happy
virtualisation.diskSize = 1024;
};
testScript = ''
2019-11-25 09:35:19 +00:00
machine.start()
2019-11-25 09:35:19 +00:00
machine.wait_for_unit("rabbitmq.service")
machine.wait_until_succeeds(
'su -s ${pkgs.runtimeShell} rabbitmq -c "rabbitmqctl status"'
2019-11-25 09:35:19 +00:00
)
machine.wait_for_open_port("15672")
'';
})