Skip to content

conformance: gateway tests expecting wrong ListenerConditionReason #1297

@mlavacca

Description

@mlavacca

What happened:

In the conformance tests for the gateway there are two different tests [GatewaySecretInvalidReferenceGrant, GatewaySecretMissingReferenceGrant] that expect a listener to have the ReasonCondition as ListenerReasonInvalidCertificateRef. Both tests create a Gateway with a listener that refers to a secret in another namespace and there is no ReferenceGrant granting that reference.

For what concerns theListenerReasonInvalidCertificateRef, the godoc says that:

// This reason is used with the "ResolvedRefs" condition when the
// Listener has a TLS configuration with at least one TLS CertificateRef
// that is invalid or cannot be resolved.

while for what concerns theListenerReasonRefNotPermitted , the godoc says that:

// This reason is used with the "ResolvedRefs" condition when
// one of the Listener's Routes has a BackendRef to an object in
// another namespace, where the object in the other namespace does
// not have a ReferenceGrant explicitly allowing the reference.

Since the listener cannot reference the secret as there is no ReferenceGrant that allows that reference, the right reason to use for the ListenerCondition is ListenerReasonRefNotPermitted instead of ListenerReasonInvalidCertificateRef.

Metadata

Metadata

Assignees

Labels

area/conformance-testIssues or PRs related to Conformance tests.kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions