Skip to content

Commit ca2cc1b

Browse files
committed
Make Rolling Upgrade test stable
1 parent 7e35a83 commit ca2cc1b

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

cypress/e2e/8_rolling-upgrades-detection.cy.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
describe('Rolling Upgrades', () => {
2+
let DEV_VERSION = "";
3+
4+
before(() => {
5+
cy.request({
6+
method: 'GET',
7+
url: 'http://localhost:51222/rest/v2/container',
8+
auth: {
9+
username: Cypress.env('username'),
10+
password: Cypress.env('password')
11+
},
12+
headers: {
13+
'Content-Type': 'application/json',
14+
},
15+
}).then(json => {
16+
DEV_VERSION = json['version'];
17+
});
18+
});
219

320
it('successfully shows the rolling upgrades detection message in NYC', () => {
421
cy.origin('http://localhost:31222/console/', () => {
@@ -29,10 +46,10 @@ describe('Rolling Upgrades', () => {
2946
}
3047
});
3148
cy.get('[data-cy=sideBarToggle]').click();
32-
cy.contains("2 members in use");
3349
cy.contains("Rolling Upgrade in Progress — Some features may be temporarily unavailable");
50+
cy.contains("2 members in use");
3451
cy.contains("16.0.0.Dev08");
35-
cy.contains("16.0.2-SNAPSHOT");
52+
cy.contains(DEV_VERSION);
3653

3754
// Restarting the docker container with same version and waiting for 20seconds to server to come up, reloading the page
3855
cy.exec('bash restart_server_with_latest_version.sh > ~/log.log', 120000).then((result) => {
@@ -45,7 +62,7 @@ describe('Rolling Upgrades', () => {
4562
cy.contains("2 members in use");
4663
cy.contains("Upgrade Complete — Please clear your browser cache and reconnect to see the latest console version.");
4764
cy.contains("16.0.0.Dev08").should('not.exist');
48-
cy.contains("16.0.2-SNAPSHOT");
65+
cy.contains(DEV_VERSION);
4966
})
5067
});
5168

run-server-for-e2e-container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
ABSOLUTE_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1111
echo ${ABSOLUTE_PATH}
12-
SERVER_IMAGE_URL="${SERVER_IMAGE_URL:-quay.io/infinispan-test/server:main}"
12+
SERVER_IMAGE_URL="${SERVER_IMAGE_URL:-quay.io/infinispan/server:16.0}"
1313
SERVER_IMAGE_URL_DIFF_VERSION="quay.io/infinispan/server:16.0.0.dev08"
1414

1515
$DOCKER_COMMAND pull ${SERVER_IMAGE_URL}

0 commit comments

Comments
 (0)