diff --git a/test/e2e/kcp_adoption.go b/test/e2e/kcp_adoption.go index 9824b74e9b3f..52314b9b1282 100644 --- a/test/e2e/kcp_adoption.go +++ b/test/e2e/kcp_adoption.go @@ -44,17 +44,11 @@ import ( type KCPAdoptionSpecInput struct { E2EConfig *clusterctl.E2EConfig ClusterctlConfigPath string - BootstrapClusterProxy ClusterProxy + BootstrapClusterProxy framework.ClusterProxy ArtifactFolder string SkipCleanup bool } -type ClusterProxy interface { - framework.ClusterProxy - - ApplyWithArgs(context.Context, []byte, ...string) error -} - // KCPAdoptionSpec implements a test that verifies KCP to properly adopt existing control plane Machines func KCPAdoptionSpec(ctx context.Context, inputGetter func() KCPAdoptionSpecInput) { var ( @@ -111,7 +105,7 @@ func KCPAdoptionSpec(ctx context.Context, inputGetter func() KCPAdoptionSpecInpu Expect(workloadClusterTemplate).ToNot(BeNil(), "Failed to get the cluster template") By("Applying the cluster template yaml to the cluster with the 'initial' selector") - Expect(input.BootstrapClusterProxy.ApplyWithArgs(ctx, workloadClusterTemplate, "--selector", "kcp-adoption.step1")).ShouldNot(HaveOccurred()) + Expect(input.BootstrapClusterProxy.Apply(ctx, workloadClusterTemplate, "--selector", "kcp-adoption.step1")).ShouldNot(HaveOccurred()) cluster = framework.DiscoveryAndWaitForCluster(ctx, framework.DiscoveryAndWaitForClusterInput{ Getter: client, @@ -132,7 +126,7 @@ func KCPAdoptionSpec(ctx context.Context, inputGetter func() KCPAdoptionSpecInpu }, WaitForControlPlaneIntervals...) By("Applying the cluster template yaml to the cluster with the 'kcp' selector") - Expect(input.BootstrapClusterProxy.ApplyWithArgs(ctx, workloadClusterTemplate, "--selector", "kcp-adoption.step2")).ShouldNot(HaveOccurred()) + Expect(input.BootstrapClusterProxy.Apply(ctx, workloadClusterTemplate, "--selector", "kcp-adoption.step2")).ShouldNot(HaveOccurred()) var controlPlane *controlplanev1.KubeadmControlPlane Eventually(func() *controlplanev1.KubeadmControlPlane { diff --git a/test/e2e/kcp_adoption_test.go b/test/e2e/kcp_adoption_test.go index a9febb8bf56d..9b8396bba50c 100644 --- a/test/e2e/kcp_adoption_test.go +++ b/test/e2e/kcp_adoption_test.go @@ -22,6 +22,8 @@ import ( "context" . "github.com/onsi/ginkgo" + + "sigs.k8s.io/cluster-api/test/framework" ) var _ = Describe("When testing KCP adoption", func() { @@ -30,7 +32,7 @@ var _ = Describe("When testing KCP adoption", func() { return KCPAdoptionSpecInput{ E2EConfig: e2eConfig, ClusterctlConfigPath: clusterctlConfigPath, - BootstrapClusterProxy: bootstrapClusterProxy.(ClusterProxy), + BootstrapClusterProxy: bootstrapClusterProxy.(framework.ClusterProxy), ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, }