diff --git a/core/src/epicli/tests/serverspec-cli/spec/rabbitmq/rabbitmq_spec.rb b/core/src/epicli/tests/serverspec-cli/spec/rabbitmq/rabbitmq_spec.rb index 07ad797f7f..35469dc54e 100644 --- a/core/src/epicli/tests/serverspec-cli/spec/rabbitmq/rabbitmq_spec.rb +++ b/core/src/epicli/tests/serverspec-cli/spec/rabbitmq/rabbitmq_spec.rb @@ -54,6 +54,7 @@ let(:disable_sudo) { false } if clustered == true listInventoryHosts("rabbitmq").each do |val| + val = val.split(".")[0] describe command("rabbitmqctl node_health_check -n rabbit@#{val}") do its(:stdout) { should match /^Health check passed$/ } its(:exit_status) { should eq 0 } @@ -74,6 +75,7 @@ end if clustered listInventoryHosts("rabbitmq").each do |val| + val = val.split(".")[0] describe command("rabbitmqctl cluster_status | awk '/running_nodes/,/}/'") do its(:stdout) { should match /rabbit@#{val}/ } its(:exit_status) { should eq 0 } @@ -127,6 +129,7 @@ let(:disable_sudo) { false } if clustered listInventoryHosts("rabbitmq").each do |val| + val = val.split(".")[0] describe command("curl -o /dev/null -s -w '%{http_code}' -u #{user}:#{pass} #{rabbitmq_host}:#{rabbitmq_api_port}/api/healthchecks/node/rabbit@#{val}") do it "is expected to be equal" do expect(subject.stdout.to_i).to eq 200 @@ -159,4 +162,4 @@ its(:stdout) { should match /Deleting user "#{user}"/ } its(:exit_status) { should eq 0 } end -end +end \ No newline at end of file