anchor.diff:  # This test runs rabbitmq and checks if rabbitmq is up and running.
   
  -import ./make-test-python.nix ({ pkgs, ... }: {
  +import ./make-test-python.nix ({ pkgs, ... }:
  +let
  +  # in real life, you would keep this out of your repo and deploy it to a safe
  +  # location using safe means.
  +  configKeyPath = pkgs.writeText "fake-config-key" "hOjWzSEn2Z7cHzKOcf6i183O2NdjurSuoMDIIv01";
  +in
  +{
     name = "rabbitmq";
     meta = with pkgs.lib.maintainers; {
       maintainers = [ eelco offline ];
  
positive.code:     services.rabbitmq = {
        enable = true;
        managementPlugin.enable = true;
      };
      # Ensure there is sufficient extra disk space for rabbitmq to be happy
      virtualisation.diskSize = 1024;
  
negative.code:         'su -s ${pkgs.runtimeShell} rabbitmq -c "rabbitmqctl status"'
      )
      machine.wait_for_open_port(15672)
  
      # The password is the plaintext that was encrypted with rabbitmqctl encode above.
      machine.wait_until_succeeds(
          '${pkgs.rabbitmq-java-client}/bin/PerfTest --time 10 --uri amqp://alice:dJT8isYu6t0Xb6u56rPglSj1vK51SlNVlXfwsRxw@localhost'
      )
    '';
  })
  