Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions cypress/e2e/8_rolling-upgrades-detection.cy.js
Original file line number Diff line number Diff line change
@@ -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/', () => {
Expand Down Expand Up @@ -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) => {
Expand All @@ -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);
})
});

Expand Down
2 changes: 1 addition & 1 deletion run-server-for-e2e-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Loading