@@ -418,6 +418,7 @@ func TestSingleNodeUpgradePreviousStable(t *testing.T) {
418418	})
419419	defer  tc .Cleanup ()
420420
421+ 	// Previous stable EC version with a -1 minor k0s version 
421422	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
422423
423424	downloadECReleaseWithOptions (t , tc , 0 , downloadECReleaseOptions {
@@ -480,7 +481,8 @@ func TestUpgradeFromReplicatedApp(t *testing.T) {
480481	})
481482	defer  tc .Cleanup ()
482483
483- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
484+ 	// Previous stable EC version with a -1 minor k0s version 
485+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
484486
485487	downloadECReleaseWithOptions (t , tc , 0 , downloadECReleaseOptions {
486488		version : initialVersion ,
@@ -496,7 +498,7 @@ func TestUpgradeFromReplicatedApp(t *testing.T) {
496498
497499	checkInstallationStateWithOptions (t , tc , installationStateOptions {
498500		version :    initialVersion ,
499- 		k8sVersion : k8sVersionPrevious ( 1 ),
501+ 		k8sVersion : k8sVersionPreviousStable ( ),
500502	})
501503
502504	appUpgradeVersion  :=  fmt .Sprintf ("appver-%s-upgrade" , os .Getenv ("SHORT_SHA" ))
@@ -704,7 +706,8 @@ func TestSingleNodeAirgapUpgrade(t *testing.T) {
704706	defer  tc .Cleanup ()
705707
706708	t .Logf ("%s: downloading airgap files on node 0" , time .Now ().Format (time .RFC3339 ))
707- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
709+ 	// Previous stable EC version with a -1 minor k0s version 
710+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
708711	runInParallel (t ,
709712		func (t  * testing.T ) error  {
710713			return  downloadAirgapBundleOnNode (t , tc , 0 , initialVersion , AirgapInstallBundlePath , AirgapLicenseID )
@@ -735,7 +738,7 @@ func TestSingleNodeAirgapUpgrade(t *testing.T) {
735738	}
736739
737740	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
738- 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
741+ 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
739742	if  _ , _ , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
740743		t .Fatalf ("fail to check installation state: %v" , err )
741744	}
@@ -775,7 +778,8 @@ func TestSingleNodeAirgapUpgradeSelinux(t *testing.T) {
775778	defer  tc .Cleanup ()
776779
777780	t .Logf ("%s: downloading airgap files on node 0" , time .Now ().Format (time .RFC3339 ))
778- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
781+ 	// Previous stable EC version with a -1 minor k0s version 
782+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
779783	runInParallel (t ,
780784		func (t  * testing.T ) error  {
781785			return  downloadAirgapBundleOnNode (t , tc , 0 , initialVersion , AirgapInstallBundlePath , AirgapLicenseID )
@@ -821,7 +825,7 @@ func TestSingleNodeAirgapUpgradeSelinux(t *testing.T) {
821825	}
822826
823827	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
824- 	line  =  []string {"/usr/local/bin/check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
828+ 	line  =  []string {"/usr/local/bin/check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
825829	if  _ , _ , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
826830		t .Fatalf ("fail to check installation state: %v" , err )
827831	}
@@ -861,7 +865,8 @@ func TestSingleNodeAirgapUpgradeCustomCIDR(t *testing.T) {
861865	defer  tc .Cleanup ()
862866
863867	t .Logf ("%s: downloading airgap files on node 0" , time .Now ().Format (time .RFC3339 ))
864- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
868+ 	// Previous stable EC version with a -1 minor k0s version 
869+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
865870	runInParallel (t ,
866871		func (t  * testing.T ) error  {
867872			return  downloadAirgapBundleOnNode (t , tc , 0 , initialVersion , AirgapInstallBundlePath , AirgapLicenseID )
@@ -892,7 +897,7 @@ func TestSingleNodeAirgapUpgradeCustomCIDR(t *testing.T) {
892897	}
893898
894899	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
895- 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
900+ 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
896901	if  _ , _ , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
897902		t .Fatalf ("fail to check installation state: %v" , err )
898903	}
@@ -1233,7 +1238,8 @@ func TestMultiNodeAirgapUpgrade(t *testing.T) {
12331238	defer  tc .Cleanup ()
12341239
12351240	t .Logf ("%s: downloading airgap files" , time .Now ().Format (time .RFC3339 ))
1236- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
1241+ 	// Previous stable EC version with a -1 minor k0s version 
1242+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
12371243	upgradeVersion  :=  fmt .Sprintf ("appver-%s-upgrade" , os .Getenv ("SHORT_SHA" ))
12381244	runInParallel (t ,
12391245		func (t  * testing.T ) error  {
@@ -1272,7 +1278,7 @@ func TestMultiNodeAirgapUpgrade(t *testing.T) {
12721278	waitForNodes (t , tc , 2 , nil )
12731279
12741280	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
1275- 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
1281+ 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
12761282	if  stdout , stderr , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
12771283		t .Fatalf ("fail to check installation state: %v: %s: %s" , err , stdout , stderr )
12781284	}
@@ -1375,16 +1381,15 @@ func TestMultiNodeAirgapUpgradePreviousStable(t *testing.T) {
13751381		t .Fatalf ("fail to run airgap update: %v: %s: %s" , err , stdout , stderr )
13761382	}
13771383
1378- 	appUpgradeVersion  :=  fmt .Sprintf ("appver-%s-noop" , os .Getenv ("SHORT_SHA" ))
1379- 	testArgs  :=  []string {appUpgradeVersion }
1384+ 	testArgs  :=  []string {upgradeVersion }
13801385
13811386	t .Logf ("%s: upgrading cluster" , time .Now ().Format (time .RFC3339 ))
13821387	if  stdout , stderr , err  :=  tc .RunPlaywrightTest ("deploy-upgrade" , testArgs ... ); err  !=  nil  {
13831388		t .Fatalf ("fail to run playwright test deploy-upgrade: %v: %s: %s" , err , stdout , stderr )
13841389	}
13851390
13861391	t .Logf ("%s: checking installation state after noop upgrade" , time .Now ().Format (time .RFC3339 ))
1387- 	line  =  []string {"check-airgap-installation-state.sh" , appUpgradeVersion , k8sVersion ()}
1392+ 	line  =  []string {"check-airgap-installation-state.sh" , upgradeVersion , k8sVersion ()}
13881393	if  stdout , stderr , err  :=  tc .RunCommandOnNode (0 , line , withEnv ); err  !=  nil  {
13891394		t .Fatalf ("fail to check installation state: %v: %s: %s" , err , stdout , stderr )
13901395	}
@@ -1395,8 +1400,7 @@ func TestMultiNodeAirgapUpgradePreviousStable(t *testing.T) {
13951400		t .Fatalf ("fail to run airgap update: %v: %s: %s" , err , stdout , stderr )
13961401	}
13971402
1398- 	appUpgradeVersion  =  fmt .Sprintf ("appver-%s-upgrade" , os .Getenv ("SHORT_SHA" ))
1399- 	testArgs  =  []string {appUpgradeVersion }
1403+ 	testArgs  =  []string {upgrade2Version }
14001404
14011405	t .Logf ("%s: upgrading cluster a second time" , time .Now ().Format (time .RFC3339 ))
14021406	if  stdout , stderr , err  :=  tc .RunPlaywrightTest ("deploy-upgrade" , testArgs ... ); err  !=  nil  {
@@ -1774,7 +1778,8 @@ func TestFiveNodesAirgapUpgrade(t *testing.T) {
17741778	defer  tc .Cleanup ()
17751779
17761780	t .Logf ("%s: downloading airgap files" , time .Now ().Format (time .RFC3339 ))
1777- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
1781+ 	// Previous stable EC version with a -1 minor k0s version 
1782+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
17781783	upgradeVersion  :=  fmt .Sprintf ("appver-%s-upgrade" , os .Getenv ("SHORT_SHA" ))
17791784	runInParallel (t ,
17801785		func (t  * testing.T ) error  {
@@ -1863,7 +1868,7 @@ func TestFiveNodesAirgapUpgrade(t *testing.T) {
18631868	waitForNodes (t , tc , 5 , nil )
18641869
18651870	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
1866- 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
1871+ 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
18671872	if  stdout , stderr , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
18681873		t .Fatalf ("fail to check installation state: %v: %s: %s" , err , stdout , stderr )
18691874	}
@@ -1975,7 +1980,8 @@ func TestSingleNodeAirgapUpgradeConfigValues(t *testing.T) {
19751980	defer  tc .Cleanup ()
19761981
19771982	t .Logf ("%s: downloading airgap files on node 0" , time .Now ().Format (time .RFC3339 ))
1978- 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-k0s-1" , os .Getenv ("SHORT_SHA" ))
1983+ 	// Previous stable EC version with a -1 minor k0s version 
1984+ 	initialVersion  :=  fmt .Sprintf ("appver-%s-previous-stable" , os .Getenv ("SHORT_SHA" ))
19791985	runInParallel (t ,
19801986		func (t  * testing.T ) error  {
19811987			return  downloadAirgapBundleOnNode (t , tc , 0 , initialVersion , AirgapInstallBundlePath , AirgapLicenseID )
@@ -2025,7 +2031,7 @@ spec:
20252031	})
20262032
20272033	t .Logf ("%s: checking installation state after app deployment" , time .Now ().Format (time .RFC3339 ))
2028- 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPrevious ( 1 )}
2034+ 	line  =  []string {"check-airgap-installation-state.sh" , initialVersion , k8sVersionPreviousStable ( )}
20292035	if  _ , _ , err  :=  tc .RunCommandOnNode (0 , line ); err  !=  nil  {
20302036		t .Fatalf ("fail to check installation state: %v" , err )
20312037	}
0 commit comments