Skip to content

Commit 16728da

Browse files
committed
fix misprints
1 parent ac3e22e commit 16728da

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

internal/controller/state/graph/httproute.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ func checkForUnsupportedHTTPFields(rule v1.HTTPRouteRule, rulePath *field.Path)
537537
if rule.Name != nil {
538538
ruleErrors = append(ruleErrors, field.Forbidden(
539539
rulePath.Child("name"),
540-
"NGINX Gateway Fabric does not support SectionName field at the moment",
540+
"NGINX Gateway Fabric does not support \"SectionName\" field at the moment",
541541
))
542542
}
543543
if rule.Timeouts != nil {

internal/controller/state/graph/httproute_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ func TestBuildHTTPRoute(t *testing.T) {
979979
},
980980
Conditions: []conditions.Condition{
981981
conditions.NewRouteUnsupportedField("There are rules with unsupported fields configurations: " +
982-
"spec.rules[0].name: Forbidden: NGINX Gateway Fabric does not support SectionName field at the moment"),
982+
"spec.rules[0].name: Forbidden: NGINX Gateway Fabric does not support \"SectionName\" field at the moment"),
983983
},
984984
},
985985
name: "valid route with unsupported field",
@@ -1783,7 +1783,7 @@ func TestProcessHTTPRouteRules_UnsupportedFields(t *testing.T) {
17831783
expectedValid: true,
17841784
expectedConds: []conditions.Condition{
17851785
conditions.NewRouteUnsupportedField("There are rules with unsupported fields configurations: spec.rules[0].name: " +
1786-
"Forbidden: NGINX Gateway Fabric does not support SectionName field at the moment"),
1786+
"Forbidden: NGINX Gateway Fabric does not support \"SectionName\" field at the moment"),
17871787
},
17881788
expectedWarns: 1,
17891789
},
@@ -1804,11 +1804,11 @@ func TestProcessHTTPRouteRules_UnsupportedFields(t *testing.T) {
18041804
expectedValid: true,
18051805
expectedConds: []conditions.Condition{
18061806
conditions.NewRouteUnsupportedField("There are rules with unsupported fields configurations: " +
1807-
"[spec.rules[0].name: Forbidden: NGINX Gateway Fabric does not support SectionName field at the moment, " +
1808-
"spec.rules[0].timeouts: Forbidden: NGINX Gateway Fabric does not support \"HTTPRouteTimeouts\" " +
1809-
"field at the moment, spec.rules[0].retry: Forbidden: NGINX Gateway Fabric does not support " +
1810-
"\"HTTPRouteRetry\" field at the moment, spec.rules[0].sessionPersistence: Forbidden: NGINX Gateway " +
1811-
"Fabric does not support \"SessionPersistence\" field at the moment]"),
1807+
"[spec.rules[0].name: Forbidden: NGINX Gateway Fabric does not support \"SectionName\" " +
1808+
"field at the moment, spec.rules[0].timeouts: Forbidden: NGINX Gateway Fabric does not support " +
1809+
"\"HTTPRouteTimeouts\" field at the moment, spec.rules[0].retry: Forbidden: NGINX Gateway Fabric " +
1810+
"does not support \"HTTPRouteRetry\" field at the moment, spec.rules[0].sessionPersistence: Forbidden: " +
1811+
"NGINX Gateway Fabric does not support \"SessionPersistence\" field at the moment]"),
18121812
},
18131813
expectedWarns: 4,
18141814
},

internal/controller/state/graph/route_common.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ type L7RouteSpec struct {
143143
}
144144

145145
type RouteRule struct {
146-
// SectionName is the name of a section in a Kubernetes resource.
146+
// Name is the name of a section in a Kubernetes resource.
147147
Name *v1.SectionName
148-
// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute.
148+
// Timeouts defines timeouts that can be configured for an HTTPRoute.
149149
Timeouts *v1.HTTPRouteTimeouts
150-
// HTTPRouteRetry defines retry configuration for an HTTPRoute.
150+
// Retry defines retry configuration for an HTTPRoute.
151151
Retry *v1.HTTPRouteRetry
152152
// SessionPersistence defines the desired state of SessionPersistence.
153153
SessionPersistence *v1.SessionPersistence

0 commit comments

Comments
 (0)