Skip to content

Commit 787f250

Browse files
Only pass username+password when not using mtls
1 parent b52776f commit 787f250

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

selenium/test/authnz-msg-protocols/amqp10.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ describe('Having AMQP 1.0 protocol enabled and the following auth_backends: ' +
1515
let expectations = []
1616
let username = process.env.RABBITMQ_AMQP_USERNAME
1717
let password = process.env.RABBITMQ_AMQP_PASSWORD
18-
18+
let usemtls = process.env.AMQP_USE_MTLS
19+
let amqpClientCommand = "npm run amqp10_roundtriptest" +
20+
(usemtls ? "" : username + " " + password)
21+
1922
before(function () {
2023
if (backends.includes("http") && username.includes("http")) {
2124
reset()
@@ -36,9 +39,8 @@ describe('Having AMQP 1.0 protocol enabled and the following auth_backends: ' +
3639
}
3740
})
3841

39-
it('can open an AMQP 1.0 connection', function () {
40-
console.log(execSync("npm run amqp10_roundtriptest -- " + username + " " + password).toString())
41-
42+
it('can open an AMQP 1.0 connection', function () {
43+
console.log(execSync(amqpClientCommand).toString())
4244
})
4345

4446
after(function () {

0 commit comments

Comments
 (0)