summary refs log blame commit diff
path: root/nixos/tests/rabbitmq.nix
blob: 8e7f34d06e32e54935ad55e81c8546b021b74ec6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                                   
 
                                               
                    
                                            
                                    
    
 

                                    


                 
                   
 



                                                                     
     
  
# This test runs rabbitmq and checks if rabbitmq is up and running.

import ./make-test-python.nix ({ pkgs, ... }: {
  name = "rabbitmq";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ eelco offline ];
  };

  machine = {
    services.rabbitmq.enable = true;
  };

  testScript = ''
    machine.start()

    machine.wait_for_unit("rabbitmq.service")
    machine.wait_until_succeeds(
        'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"'
    )
  '';
})