2014-04-14 14:02:44 +02:00
|
|
|
# This test runs rabbitmq and checks if rabbitmq is up and running.
|
2014-03-10 11:10:32 +01:00
|
|
|
|
2019-11-25 10:35:19 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "rabbitmq";
|
2015-07-12 12:09:40 +02:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2019-02-22 16:14:13 +01:00
|
|
|
maintainers = [ eelco offline ];
|
2015-07-12 12:09:40 +02:00
|
|
|
};
|
2014-03-10 11:10:32 +01:00
|
|
|
|
2019-11-25 10:35:19 +01:00
|
|
|
machine = {
|
|
|
|
services.rabbitmq.enable = true;
|
2014-03-10 11:10:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-11-25 10:35:19 +01:00
|
|
|
machine.start()
|
2014-04-14 14:02:44 +02:00
|
|
|
|
2019-11-25 10:35:19 +01:00
|
|
|
machine.wait_for_unit("rabbitmq.service")
|
|
|
|
machine.wait_until_succeeds(
|
|
|
|
'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"'
|
|
|
|
)
|
2014-03-10 11:10:32 +01:00
|
|
|
'';
|
2014-04-14 14:02:44 +02:00
|
|
|
})
|