diff --git a/test/v1alpha1/service.go b/test/v1alpha1/service.go index 3f9f8100e36b..16cbe111ce61 100644 --- a/test/v1alpha1/service.go +++ b/test/v1alpha1/service.go @@ -30,10 +30,6 @@ import ( "encoding/pem" "errors" "fmt" - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/watch" - "knative.dev/pkg/apis/istio/v1alpha3" - "knative.dev/pkg/test/spoof" "math/big" "net" "net/http" @@ -42,8 +38,13 @@ import ( "testing" "time" + "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/watch" + "knative.dev/pkg/apis/istio/v1alpha3" + "knative.dev/pkg/test/spoof" + "github.com/mattbaird/jsonpatch" - "github.com/pkg/errors" + perrors "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -59,13 +60,14 @@ import ( const ( // Namespace is the namespace of the ingress gateway - Namespace = "knative-serving" + Namespace = "knative-serving" // GatewayName is the name of the ingress gateway - GatewayName = "knative-ingress-gateway" + GatewayName = "knative-ingress-gateway" ) + var ( - domainName *string + domainName *string ) func validateCreatedServiceStatus(clients *test.Clients, names *test.ResourceNames) error { @@ -317,13 +319,13 @@ func WaitForServiceLatestRevision(clients *test.Clients, names test.ResourceName return false, nil }, "ServiceUpdatedWithRevision") if err != nil { - return "", errors.Wrapf(err, "LatestCreatedRevisionName not updated") + return "", perrors.Wrapf(err, "LatestCreatedRevisionName not updated") } err = WaitForServiceState(clients.ServingAlphaClient, names.Service, func(s *v1alpha1.Service) (bool, error) { return (s.Status.LatestReadyRevisionName == revisionName), nil }, "ServiceReadyWithRevision") - return revisionName, errors.Wrapf(err, "LatestReadyRevisionName not updated with %s", revisionName) + return revisionName, perrors.Wrapf(err, "LatestReadyRevisionName not updated with %s", revisionName) } // LatestService returns a Service object in namespace with the name names.Service