diff --git a/pkg/builder/builder_suite_test.go b/pkg/builder/builder_suite_test.go index 466e2eee9c..0dc260d4bf 100644 --- a/pkg/builder/builder_suite_test.go +++ b/pkg/builder/builder_suite_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/envtest" "sigs.k8s.io/controller-runtime/pkg/envtest/printer" - "sigs.k8s.io/controller-runtime/pkg/internal/testing/integration/addr" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/addr" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/metrics" diff --git a/pkg/envtest/server.go b/pkg/envtest/server.go index 63f64ab550..ad59ec3aa4 100644 --- a/pkg/envtest/server.go +++ b/pkg/envtest/server.go @@ -28,7 +28,7 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/internal/testing/integration" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane" logf "sigs.k8s.io/controller-runtime/pkg/internal/log" ) @@ -82,20 +82,20 @@ func (te *Environment) getBinAssetPath(binary string) string { return filepath.Join(defaultKubebuilderPath, binary) } -// ControlPlane is the re-exported ControlPlane type from the internal integration package -type ControlPlane = integration.ControlPlane +// ControlPlane is the re-exported ControlPlane type from the internal testing package +type ControlPlane = controlplane.ControlPlane -// APIServer is the re-exported APIServer type from the internal integration package -type APIServer = integration.APIServer +// APIServer is the re-exported APIServer type from the internal testing package +type APIServer = controlplane.APIServer -// Etcd is the re-exported Etcd type from the internal integration package -type Etcd = integration.Etcd +// Etcd is the re-exported Etcd type from the internal testing package +type Etcd = controlplane.Etcd // Environment creates a Kubernetes test environment that will start / stop the Kubernetes control plane and // install extension APIs type Environment struct { // ControlPlane is the ControlPlane including the apiserver and etcd - ControlPlane integration.ControlPlane + ControlPlane controlplane.ControlPlane // Scheme is used to determine if conversion webhooks should be enabled // for a particular CRD / object. @@ -219,10 +219,10 @@ func (te *Environment) Start() (*rest.Config, error) { } } else { if te.ControlPlane.APIServer == nil { - te.ControlPlane.APIServer = &integration.APIServer{Args: te.getAPIServerFlags()} + te.ControlPlane.APIServer = &controlplane.APIServer{Args: te.getAPIServerFlags()} } if te.ControlPlane.Etcd == nil { - te.ControlPlane.Etcd = &integration.Etcd{} + te.ControlPlane.Etcd = &controlplane.Etcd{} } if os.Getenv(envAttachOutput) == "true" { @@ -357,4 +357,4 @@ func (te *Environment) useExistingCluster() bool { // DefaultKubeAPIServerFlags exposes the default args for the APIServer so that // you can use those to append your own additional arguments. -var DefaultKubeAPIServerFlags = integration.APIServerDefaultArgs +var DefaultKubeAPIServerFlags = controlplane.APIServerDefaultArgs diff --git a/pkg/envtest/webhook.go b/pkg/envtest/webhook.go index 880076f898..93dcb31098 100644 --- a/pkg/envtest/webhook.go +++ b/pkg/envtest/webhook.go @@ -33,8 +33,8 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/internal/testing/integration" - "sigs.k8s.io/controller-runtime/pkg/internal/testing/integration/addr" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/certs" + "sigs.k8s.io/controller-runtime/pkg/internal/testing/addr" "sigs.k8s.io/yaml" ) @@ -274,7 +274,7 @@ func (p *webhookPoller) poll() (done bool, err error) { // setupCA creates CA for testing and writes them to disk func (o *WebhookInstallOptions) setupCA() error { - hookCA, err := integration.NewTinyCA() + hookCA, err := certs.NewTinyCA() if err != nil { return fmt.Errorf("unable to set up webhook CA: %v", err) }