diff --git a/.github/workflows/test-authnz.yaml b/.github/workflows/test-authnz.yaml index 45dd825dcfa6..75b6b74cedc8 100644 --- a/.github/workflows/test-authnz.yaml +++ b/.github/workflows/test-authnz.yaml @@ -20,12 +20,10 @@ on: - .github/workflows/test-authnz.yaml pull_request: paths: + - 'selenium/**' - '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/amqp.js b/selenium/test/amqp.js index 715cd079da89..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 { @@ -19,16 +20,18 @@ 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')) + 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,14 +43,14 @@ module.exports = { resolve() }) }) - let connection = container.connect(getConnectionOptions()) + let connection = container.connect(connectionOptions) 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' }) diff --git a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js index 0cd98f6ea08c..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,20 +69,18 @@ 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("examples", incomingLink.targetAddress) + assert.equal("my-queue", incomingLink.targetAddress) assert.equal("mixed", incomingLink.sndSettleMode) assert.equal("0", incomingLink.unconfirmedMessages) 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("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)