Skip to content

Commit

Permalink
Replace Ready condition with Programmed in Listener conf tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LCaparelli committed Nov 1, 2022
1 parent 72f770e commit 9dd5c80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func init() {

var GatewaySecretMissingReferencedSecret = suite.ConformanceTest{
ShortName: "GatewaySecretMissingReferencedSecret",
Description: "A Gateway should fail to become ready if the Gateway has a certificateRef for a nonexistent Secret",
Description: "A Gateway should fail to become programmed if the Gateway has a certificateRef for a nonexistent Secret",
Manifests: []string{"tests/gateway-secret-missing-referenced-secret.yaml"},
Test: func(t *testing.T, s *suite.ConformanceTestSuite) {
gwNN := types.NamespacedName{Name: "gateway-secret-missing-referenced-secret", Namespace: "gateway-conformance-infra"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ func init() {

var GatewaySecretReferenceGrantAllInNamespace = suite.ConformanceTest{
ShortName: "GatewaySecretReferenceGrantAllInNamespace",
Description: "A Gateway in the gateway-conformance-infra namespace should become ready if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to all Secrets in the namespace exists",
Description: "A Gateway in the gateway-conformance-infra namespace should become programmed if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to all Secrets in the namespace exists",
Exemptions: []suite.ExemptFeature{suite.ExemptReferenceGrant},
Manifests: []string{"tests/gateway-secret-reference-grant-all-in-namespace.yaml"},
Test: func(t *testing.T, s *suite.ConformanceTestSuite) {
gwNN := types.NamespacedName{Name: "gateway-secret-reference-grant", Namespace: "gateway-conformance-infra"}

t.Run("Gateway listener should have a true ResolvedRefs condition and a true Ready condition", func(t *testing.T) {
t.Run("Gateway listener should have a true ResolvedRefs condition and a true Programmed condition", func(t *testing.T) {
listeners := []v1beta1.ListenerStatus{{
Name: v1beta1.SectionName("https"),
SupportedKinds: []v1beta1.RouteGroupKind{{
Expand All @@ -48,9 +48,9 @@ var GatewaySecretReferenceGrantAllInNamespace = suite.ConformanceTest{
}},
Conditions: []metav1.Condition{
{
Type: string(v1beta1.ListenerConditionReady),
Type: string(v1beta1.ListenerConditionProgrammed),
Status: metav1.ConditionTrue,
Reason: string(v1beta1.ListenerReasonReady),
Reason: string(v1beta1.ListenerConditionProgrammed),
},
},
}}
Expand Down
8 changes: 4 additions & 4 deletions conformance/tests/gateway-secret-reference-grant-specific.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ func init() {

var GatewaySecretReferenceGrantSpecific = suite.ConformanceTest{
ShortName: "GatewaySecretReferenceGrantSpecific",
Description: "A Gateway in the gateway-conformance-infra namespace should become ready if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to the specific Secret exists",
Description: "A Gateway in the gateway-conformance-infra namespace should become programmed if the Gateway has a certificateRef for a Secret in the gateway-conformance-web-backend namespace and a ReferenceGrant granting permission to the specific Secret exists",
Exemptions: []suite.ExemptFeature{suite.ExemptReferenceGrant},
Manifests: []string{"tests/gateway-secret-reference-grant-specific.yaml"},
Test: func(t *testing.T, s *suite.ConformanceTestSuite) {
gwNN := types.NamespacedName{Name: "gateway-secret-reference-grant", Namespace: "gateway-conformance-infra"}

t.Run("Gateway listener should have a true ResolvedRefs condition and a true Ready condition", func(t *testing.T) {
t.Run("Gateway listener should have a true ResolvedRefs condition and a true Programmed condition", func(t *testing.T) {
listeners := []v1beta1.ListenerStatus{{
Name: v1beta1.SectionName("https"),
SupportedKinds: []v1beta1.RouteGroupKind{{
Expand All @@ -48,9 +48,9 @@ var GatewaySecretReferenceGrantSpecific = suite.ConformanceTest{
}},
Conditions: []metav1.Condition{
{
Type: string(v1beta1.ListenerConditionReady),
Type: string(v1beta1.ListenerConditionProgrammed),
Status: metav1.ConditionTrue,
Reason: string(v1beta1.ListenerReasonReady),
Reason: string(v1beta1.ListenerReasonProgrammed),
},
},
}}
Expand Down

0 comments on commit 9dd5c80

Please sign in to comment.