@@ -23,8 +23,8 @@ func TestValidateCRDVersions(t *testing.T) {
2323 }
2424 }
2525
26- // Adding patch version to RecommendedVersion to try and avoid having to update these tests with every release.
27- fields := strings .Split (gatewayclass .RecommendedVersion , "." )
26+ // Adding patch version to SupportedVersion to try and avoid having to update these tests with every release.
27+ fields := strings .Split (gatewayclass .SupportedVersion , "." )
2828 fields [2 ] = "99"
2929
3030 validVersionWithPatch := createCRDMetadata (strings .Join (fields , "." ))
@@ -67,7 +67,7 @@ func TestValidateCRDVersions(t *testing.T) {
6767 {Name : "referencegrants.gateway.networking.k8s.io" }: bestEffortVersion ,
6868 },
6969 valid : true ,
70- expConds : conditions .NewGatewayClassSupportedVersionBestEffort (gatewayclass .RecommendedVersion ),
70+ expConds : conditions .NewGatewayClassSupportedVersionBestEffort (gatewayclass .SupportedVersion ),
7171 },
7272 {
7373 name : "valid; mix of supported and best effort versions" ,
@@ -78,7 +78,7 @@ func TestValidateCRDVersions(t *testing.T) {
7878 {Name : "referencegrants.gateway.networking.k8s.io" }: validVersionWithPatch ,
7979 },
8080 valid : true ,
81- expConds : conditions .NewGatewayClassSupportedVersionBestEffort (gatewayclass .RecommendedVersion ),
81+ expConds : conditions .NewGatewayClassSupportedVersionBestEffort (gatewayclass .SupportedVersion ),
8282 },
8383 {
8484 name : "invalid; all unsupported versions" ,
@@ -89,7 +89,7 @@ func TestValidateCRDVersions(t *testing.T) {
8989 {Name : "referencegrants.gateway.networking.k8s.io" }: unsupportedVersion ,
9090 },
9191 valid : false ,
92- expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .RecommendedVersion ),
92+ expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .SupportedVersion ),
9393 },
9494 {
9595 name : "invalid; mix unsupported and best effort versions" ,
@@ -100,15 +100,15 @@ func TestValidateCRDVersions(t *testing.T) {
100100 {Name : "referencegrants.gateway.networking.k8s.io" }: bestEffortVersion ,
101101 },
102102 valid : false ,
103- expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .RecommendedVersion ),
103+ expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .SupportedVersion ),
104104 },
105105 {
106106 name : "invalid; bad version string" ,
107107 crds : map [types.NamespacedName ]* metav1.PartialObjectMetadata {
108108 {Name : "gatewayclasses.gateway.networking.k8s.io" }: createCRDMetadata ("v" ),
109109 },
110110 valid : false ,
111- expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .RecommendedVersion ),
111+ expConds : conditions .NewGatewayClassUnsupportedVersion (gatewayclass .SupportedVersion ),
112112 },
113113 }
114114
0 commit comments