Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ironcladlou committed Feb 13, 2020
1 parent 5a2ca8c commit c5b9c22
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/operator/controller/ingress/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"

iov1 "github.com/openshift/api/operatoringress/v1"

retryable "github.com/openshift/cluster-ingress-operator/pkg/util/retryableerror"

"github.com/openshift/cluster-ingress-operator/pkg/manifests"
Expand Down Expand Up @@ -135,15 +133,15 @@ func TestComputeIngressDegradedCondition(t *testing.T) {
{
name: "deployment degraded for <30s",
conditions: []operatorv1.OperatorCondition{
cond(iov1.IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Second*-20)),
cond(IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Second*-20)),
},
expectIngressDegradedStatus: operatorv1.ConditionFalse,
expectRequeue: true,
},
{
name: "deployment degraded for >30s",
conditions: []operatorv1.OperatorCondition{
cond(iov1.IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Second*-31)),
cond(IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Second*-31)),
},
expectIngressDegradedStatus: operatorv1.ConditionTrue,
expectRequeue: true,
Expand Down Expand Up @@ -207,7 +205,7 @@ func TestComputeIngressDegradedCondition(t *testing.T) {
name: "DNS not ready and deployment degraded",
conditions: []operatorv1.OperatorCondition{
cond(IngressControllerAdmittedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(iov1.IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.LoadBalancerManagedIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.LoadBalancerReadyIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.DNSManagedIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
Expand All @@ -220,7 +218,7 @@ func TestComputeIngressDegradedCondition(t *testing.T) {
name: "admitted, DNS, LB, and deployment OK",
conditions: []operatorv1.OperatorCondition{
cond(IngressControllerAdmittedConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(iov1.IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionFalse, "", clock.Now().Add(time.Hour*-1)),
cond(IngressControllerDeploymentDegradedConditionType, operatorv1.ConditionFalse, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.LoadBalancerManagedIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.LoadBalancerReadyIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
cond(operatorv1.DNSManagedIngressConditionType, operatorv1.ConditionTrue, "", clock.Now().Add(time.Hour*-1)),
Expand Down

0 comments on commit c5b9c22

Please sign in to comment.