@@ -839,9 +839,10 @@ var _ = Describe("HCP MachinePool", ci.Day2, ci.FeatureMachinepool, func() {
839
839
By ("Try to create a nodepool with version < CP version-2" )
840
840
throttleVersion := fmt .Sprintf ("%v.%v.0" , currentSemVer .Major (), currentSemVer .Minor ()- 2 )
841
841
versions = cms .GetHcpLowerVersions (cms .RHCSConnection , throttleVersion , profileHandler .Profile ().GetChannelGroup ())
842
+ versions = cms .SortVersions (versions )
842
843
if len (versions ) > 0 {
843
844
validateMPArgAgainstErrorSubstrings (mpName , func (args * exec.MachinePoolArgs ) {
844
- args .OpenshiftVersion = helper .StringPointer (versions [0 ].RawID )
845
+ args .OpenshiftVersion = helper .StringPointer (versions [len ( versions ) - 1 ].RawID )
845
846
}, "must be no less than 2 minor versions behind the Control Plane version" )
846
847
} else {
847
848
Logger .Info ("No version < CP version - 2 found to test against" )
@@ -850,7 +851,7 @@ var _ = Describe("HCP MachinePool", ci.Day2, ci.FeatureMachinepool, func() {
850
851
By ("Try to create a nodepool with not supported version" )
851
852
validateMPArgAgainstErrorSubstrings (mpName , func (args * exec.MachinePoolArgs ) {
852
853
args .OpenshiftVersion = helper .StringPointer ("4.10.67" )
853
- }, "must be greater than the lowest supported version" )
854
+ }, "must be greater than the minimal supported version" )
854
855
855
856
By ("Try to create a nodepool with wrong version" )
856
857
validateMPArgAgainstErrorSubstrings (mpName , func (args * exec.MachinePoolArgs ) {
0 commit comments