From ca2cc1b258597955d50cdb59031698cc5ce4b335 Mon Sep 17 00:00:00 2001 From: Katia Aresti Date: Tue, 2 Dec 2025 16:54:00 +0100 Subject: [PATCH] Make Rolling Upgrade test stable --- .../e2e/8_rolling-upgrades-detection.cy.js | 23 ++++++++++++++++--- run-server-for-e2e-container.sh | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/8_rolling-upgrades-detection.cy.js b/cypress/e2e/8_rolling-upgrades-detection.cy.js index 1622ec1a..8d0abe33 100644 --- a/cypress/e2e/8_rolling-upgrades-detection.cy.js +++ b/cypress/e2e/8_rolling-upgrades-detection.cy.js @@ -1,4 +1,21 @@ describe('Rolling Upgrades', () => { + let DEV_VERSION = ""; + + before(() => { + cy.request({ + method: 'GET', + url: 'http://localhost:51222/rest/v2/container', + auth: { + username: Cypress.env('username'), + password: Cypress.env('password') + }, + headers: { + 'Content-Type': 'application/json', + }, + }).then(json => { + DEV_VERSION = json['version']; + }); + }); it('successfully shows the rolling upgrades detection message in NYC', () => { cy.origin('http://localhost:31222/console/', () => { @@ -29,10 +46,10 @@ describe('Rolling Upgrades', () => { } }); cy.get('[data-cy=sideBarToggle]').click(); - cy.contains("2 members in use"); cy.contains("Rolling Upgrade in Progress — Some features may be temporarily unavailable"); + cy.contains("2 members in use"); cy.contains("16.0.0.Dev08"); - cy.contains("16.0.2-SNAPSHOT"); + cy.contains(DEV_VERSION); // Restarting the docker container with same version and waiting for 20seconds to server to come up, reloading the page cy.exec('bash restart_server_with_latest_version.sh > ~/log.log', 120000).then((result) => { @@ -45,7 +62,7 @@ describe('Rolling Upgrades', () => { cy.contains("2 members in use"); cy.contains("Upgrade Complete — Please clear your browser cache and reconnect to see the latest console version."); cy.contains("16.0.0.Dev08").should('not.exist'); - cy.contains("16.0.2-SNAPSHOT"); + cy.contains(DEV_VERSION); }) }); diff --git a/run-server-for-e2e-container.sh b/run-server-for-e2e-container.sh index 835278cb..d66ccbca 100755 --- a/run-server-for-e2e-container.sh +++ b/run-server-for-e2e-container.sh @@ -9,7 +9,7 @@ fi ABSOLUTE_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo ${ABSOLUTE_PATH} -SERVER_IMAGE_URL="${SERVER_IMAGE_URL:-quay.io/infinispan-test/server:main}" +SERVER_IMAGE_URL="${SERVER_IMAGE_URL:-quay.io/infinispan/server:16.0}" SERVER_IMAGE_URL_DIFF_VERSION="quay.io/infinispan/server:16.0.0.dev08" $DOCKER_COMMAND pull ${SERVER_IMAGE_URL}