From 713c7c9a535e05cf7a73219ab9e232012dab93f3 Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:02:23 +0100 Subject: [PATCH 1/6] Fix queue name used in amqp10 --- selenium/test/amqp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selenium/test/amqp.js b/selenium/test/amqp.js index 715cd079da89..fe21cfdc8f87 100644 --- a/selenium/test/amqp.js +++ b/selenium/test/amqp.js @@ -42,12 +42,12 @@ module.exports = { }) let connection = container.connect(getConnectionOptions()) let receiver = connection.open_receiver({ - source: 'examples', + source: 'my-queue', target: 'receiver-target', name: 'receiver-link' }) let sender = connection.open_sender({ - target: 'examples', + target: 'my-queue', source: 'sender-source', name: 'sender-link' }) From 31f0a5487f60309daf18940b3d3f3b4544bb577b Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:18:38 +0100 Subject: [PATCH 2/6] Fix issue in amqp10 --- selenium/test/amqp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selenium/test/amqp.js b/selenium/test/amqp.js index fe21cfdc8f87..53bababcd786 100644 --- a/selenium/test/amqp.js +++ b/selenium/test/amqp.js @@ -19,7 +19,7 @@ function getAmqpsConnectionOptions() { options['enable_sasl_external'] = true } options['transport'] = 'tls' - let certsLocation = getEnv("RABBITMQ_CERTS"); + let certsLocation = process.env.RABBITMQ_CERTS options['key'] = fs.readFileSync(path.resolve(certsLocation,'client_rabbitmq_key.pem')) options['cert'] = fs.readFileSync(path.resolve(certsLocation,'client_rabbitmq_certificate.pem')) options['ca'] = fs.readFileSync(path.resolve(certsLocation,'ca_rabbitmq_certificate.pem')) From 40d150fb9d93bf284a4ab29807921e80f92cfcb7 Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:30:50 +0100 Subject: [PATCH 3/6] Fix bug building connection options for amqps --- selenium/test/amqp.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selenium/test/amqp.js b/selenium/test/amqp.js index 53bababcd786..5b5a01b5bf54 100644 --- a/selenium/test/amqp.js +++ b/selenium/test/amqp.js @@ -1,6 +1,7 @@ var container = require('rhea') // https://github.com/amqp/rhea var fs = require('fs'); var path = require('path'); +var connectionOptions = getConnectionOptions() function getAmqpConnectionOptions() { return { @@ -23,12 +24,14 @@ function getAmqpsConnectionOptions() { options['key'] = fs.readFileSync(path.resolve(certsLocation,'client_rabbitmq_key.pem')) options['cert'] = fs.readFileSync(path.resolve(certsLocation,'client_rabbitmq_certificate.pem')) options['ca'] = fs.readFileSync(path.resolve(certsLocation,'ca_rabbitmq_certificate.pem')) + return options } function getConnectionOptions() { - switch(process.env.RABBITMQ_AMQP_SCHEME || 'amqp'){ - case 'amqp': + let scheme = process.env.RABBITMQ_AMQP_SCHEME || 'amqp' + switch(scheme){ + case "amqp": return getAmqpConnectionOptions() - case 'amqps': + case "amqps": return getAmqpsConnectionOptions() } } @@ -40,7 +43,7 @@ module.exports = { resolve() }) }) - let connection = container.connect(getConnectionOptions()) + let connection = container.connect(connectionOptions) let receiver = connection.open_receiver({ source: 'my-queue', target: 'receiver-target', From d629b7bac7d80f656179e5338523f626f8087f8c Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:31:30 +0100 Subject: [PATCH 4/6] Run messaging authnz suite when selenium folder changes --- .github/workflows/test-authnz.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-authnz.yaml b/.github/workflows/test-authnz.yaml index 45dd825dcfa6..ed08c2d21458 100644 --- a/.github/workflows/test-authnz.yaml +++ b/.github/workflows/test-authnz.yaml @@ -20,6 +20,7 @@ on: - .github/workflows/test-authnz.yaml pull_request: paths: + - 'selenium/**' - 'deps/rabbit/**' - 'deps/rabbitmq_auth_/**' - 'deps/rabbitmq_mqtt/**' From 0f9a7cfb9cf0d05a6ee7bfcdf474100c3632296e Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:54:19 +0100 Subject: [PATCH 5/6] Fix queue name --- .../test/connections/amqp10/sessions-for-monitoring-user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js index 0cd98f6ea08c..613bbb111d79 100644 --- a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js +++ b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js @@ -73,7 +73,7 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function //console.log("incomingLink: " + JSON.stringify(incomingLink)) assert.equal(1, incomingLink.handle) assert.equal("sender-link", incomingLink.name) - assert.equal("examples", incomingLink.targetAddress) + assert.equal("my-queue", incomingLink.targetAddress) assert.equal("mixed", incomingLink.sndSettleMode) assert.equal("0", incomingLink.unconfirmedMessages) assert.equal(1, incomingLink.deliveryCount) @@ -82,8 +82,8 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function //console.log("outgoingLink: " + JSON.stringify(outgoingLink)) assert.equal(0, outgoingLink.handle) assert.equal("receiver-link", outgoingLink.name) - assert.equal("examples", outgoingLink.sourceAddress) - assert.equal("examples", outgoingLink.queueName) + assert.equal("my-queue", outgoingLink.sourceAddress) + assert.equal("my-queue", outgoingLink.queueName) assert.equal(false, outgoingLink.sendSettled) assert.equal("unlimited", outgoingLink.maxMessageSize) From 1d8b28d10eccf6df916f100ed4eb4442850851c7 Mon Sep 17 00:00:00 2001 From: Marcial Rosales Date: Thu, 28 Nov 2024 16:56:12 +0100 Subject: [PATCH 6/6] Clean up --- .github/workflows/test-authnz.yaml | 3 --- .../test/connections/amqp10/sessions-for-monitoring-user.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/test-authnz.yaml b/.github/workflows/test-authnz.yaml index ed08c2d21458..75b6b74cedc8 100644 --- a/.github/workflows/test-authnz.yaml +++ b/.github/workflows/test-authnz.yaml @@ -24,9 +24,6 @@ on: - 'deps/rabbit/**' - 'deps/rabbitmq_auth_/**' - 'deps/rabbitmq_mqtt/**' - - 'deps/rabbitmq_management/selenium/full-suite-authnz-messaging' - - 'deps/rabbitmq_management/selenium/suites/authnz-messaging/**' - - 'deps/rabbitmq_management/selenium/test/authnz-msg-protocols/**' - .github/workflows/test-authnz.yaml concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js index 613bbb111d79..083ea88dca3e 100644 --- a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js +++ b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js @@ -58,7 +58,6 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function let sessions = await connectionPage.getSessions() assert.equal(1, sessions.sessions.length) let session = connectionPage.getSessionInfo(sessions.sessions, 0) - //console.log("session: " + JSON.stringify(session)) assert.equal(0, session.channelNumber) assert.equal(1, session.nextIncomingId) assert.equal(0, session.outgoingUnsettledDeliveries) @@ -70,7 +69,6 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function assert.equal(1, sessions.outgoing_links.length) let incomingLink = connectionPage.getIncomingLinkInfo(sessions.incoming_links, 0) - //console.log("incomingLink: " + JSON.stringify(incomingLink)) assert.equal(1, incomingLink.handle) assert.equal("sender-link", incomingLink.name) assert.equal("my-queue", incomingLink.targetAddress) @@ -79,7 +77,6 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function assert.equal(1, incomingLink.deliveryCount) let outgoingLink = connectionPage.getOutgoingLinkInfo(sessions.outgoing_links, 0) - //console.log("outgoingLink: " + JSON.stringify(outgoingLink)) assert.equal(0, outgoingLink.handle) assert.equal("receiver-link", outgoingLink.name) assert.equal("my-queue", outgoingLink.sourceAddress)