Skip to content

Commit 08c5a4b

Browse files
committed
Use BackendTLSPolicy name
1 parent 1ecb136 commit 08c5a4b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

internal/controller/state/conditions/conditions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func NewRouteNotAllowedByListeners() Condition {
322322
}
323323
}
324324

325-
// NewRouteNoMatchingListenerHostname returns a Condition that indicates that the hostname of the listener
325+
// NewRouteNoMatchingListenerHostname returns a Condition that indicates that the hostname of the Listener
326326
// does not match the hostnames of the Route.
327327
func NewRouteNoMatchingListenerHostname() Condition {
328328
return Condition{
@@ -397,7 +397,7 @@ func NewRouteHostnameConflict() Condition {
397397
Type: string(v1.RouteConditionAccepted),
398398
Status: metav1.ConditionFalse,
399399
Reason: string(RouteReasonHostnameConflict),
400-
Message: "Hostname(s) conflict with another route of the same kind on the same port",
400+
Message: "Hostname(s) conflict with another Route of the same kind on the same port",
401401
}
402402
}
403403

internal/controller/state/graph/backend_refs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func findBackendTLSPolicyForService(
420420
beTLSPolicy.IsReferenced = true
421421
if !beTLSPolicy.Valid {
422422
//nolint:staticcheck // Capitalization required for alignment with other messages.
423-
err = fmt.Errorf("The backend TLS policy is invalid: %s", beTLSPolicy.Conditions[0].Message)
423+
err = fmt.Errorf("The BackendTLSPolicy is invalid: %s", beTLSPolicy.Conditions[0].Message)
424424
} else {
425425
beTLSPolicy.Conditions = append(beTLSPolicy.Conditions, conditions.NewPolicyAccepted())
426426
}

internal/controller/state/graph/backend_refs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ func TestCreateBackend(t *testing.T) {
15731573
expectedServicePortReference: "",
15741574
expectedConditions: []conditions.Condition{
15751575
conditions.NewRouteBackendRefUnsupportedValue(
1576-
"The backend TLS policy is invalid: Unsupported value",
1576+
"The BackendTLSPolicy is invalid: Unsupported value",
15771577
),
15781578
},
15791579
name: "invalid policy",

internal/controller/status/prepare_requests_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ func TestBuildSnippetsFilterStatuses(t *testing.T) {
20602060
Generation: 1,
20612061
},
20622062
},
2063-
Conditions: []conditions.Condition{conditions.NewSnippetsFilterInvalid("Invalid snippetsFilter")},
2063+
Conditions: []conditions.Condition{conditions.NewSnippetsFilterInvalid("Invalid SnippetsFilter")},
20642064
Valid: false,
20652065
}
20662066

@@ -2118,7 +2118,7 @@ func TestBuildSnippetsFilterStatuses(t *testing.T) {
21182118
ObservedGeneration: 1,
21192119
LastTransitionTime: transitionTime,
21202120
Reason: string(ngfAPI.SnippetsFilterConditionReasonInvalid),
2121-
Message: "Invalid snippetsFilter",
2121+
Message: "Invalid SnippetsFilter",
21222122
},
21232123
},
21242124
ControllerName: gatewayCtlrName,

0 commit comments

Comments
 (0)