1# This test runs rabbitmq and checks if rabbitmq is up and running.
2
3import ./make-test-python.nix ({ pkgs, ... }: {
4 name = "rabbitmq";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ eelco offline ];
7 };
8
9 machine = {
10 services.rabbitmq = {
11 enable = true;
12 managementPlugin.enable = true;
13 };
14 # Ensure there is sufficient extra disk space for rabbitmq to be happy
15 virtualisation.diskSize = 1024;
16 };
17
18 testScript = ''
19 machine.start()
20
21 machine.wait_for_unit("rabbitmq.service")
22 machine.wait_until_succeeds(
23 'su -s ${pkgs.runtimeShell} rabbitmq -c "rabbitmqctl status"'
24 )
25 machine.wait_for_open_port("15672")
26 '';
27})