11describe ( '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/' , ( ) => {
@@ -30,9 +47,10 @@ describe('Rolling Upgrades', () => {
3047 } ) ;
3148 cy . get ( '[data-cy=sideBarToggle]' ) . click ( ) ;
3249 cy . contains ( "2 members in use" ) ;
33- cy . contains ( "Rolling Upgrade in Progress — Some features may be temporarily unavailable" ) ;
3450 cy . contains ( "16.0.0.Dev08" ) ;
35- cy . contains ( '16.1.0-SNAPSHOT' ) ;
51+ cy . contains ( DEV_VERSION ) ;
52+
53+ cy . contains ( "Rolling Upgrade in Progress — Some features may be temporarily unavailable" ) ;
3654
3755 // Restarting the docker container with same version and waiting for 20seconds to server to come up, reloading the page
3856 cy . exec ( 'bash restart_server_with_latest_version.sh > ~/log.log' , 120000 ) . then ( ( result ) => {
@@ -45,7 +63,7 @@ describe('Rolling Upgrades', () => {
4563 cy . contains ( "2 members in use" ) ;
4664 cy . contains ( "Upgrade Complete — Please clear your browser cache and reconnect to see the latest console version." ) ;
4765 cy . contains ( "16.0.0.Dev08" ) . should ( 'not.exist' ) ;
48- cy . contains ( '16.1.0-SNAPSHOT' ) ;
66+ cy . contains ( DEV_VERSION ) ;
4967 } )
5068 } ) ;
5169
0 commit comments