Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixosTests.rabbitmq: port to python #74123

Merged
merged 1 commit into from Nov 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions nixos/tests/rabbitmq.nix
@@ -1,21 +1,21 @@
# This test runs rabbitmq and checks if rabbitmq is up and running.

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

nodes = {
one = { ... }: {
services.rabbitmq.enable = true;
};
machine = {
services.rabbitmq.enable = true;
};

testScript = ''
startAll;
machine.start()

$one->waitForUnit("rabbitmq.service");
$one->waitUntilSucceeds("su -s ${pkgs.stdenv.shell} rabbitmq -c \"rabbitmqctl status\"");
machine.wait_for_unit("rabbitmq.service")
machine.wait_until_succeeds(
'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why this uses stdenv,shell, this really shouldn't be an issue.
It should probably be

Suggested change
'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"'
'su - rabbitmq -c "rabbitmqctl status"'

)
'';
})