From c91fcd76602d02ffbb98627a19d9e869717a276b Mon Sep 17 00:00:00 2001 From: willie-yao Date: Tue, 5 Sep 2023 18:48:51 +0000 Subject: [PATCH] Fix rebase errors --- .../topology/cluster/current_state_test.go | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/controllers/topology/cluster/current_state_test.go b/internal/controllers/topology/cluster/current_state_test.go index 6fd7ff6b6635..4c1fff6db494 100644 --- a/internal/controllers/topology/cluster/current_state_test.go +++ b/internal/controllers/topology/cluster/current_state_test.go @@ -173,8 +173,8 @@ func TestGetCurrentState(t *testing.T) { clusterv1.ClusterTopologyOwnedLabel: "", clusterv1.ClusterTopologyMachinePoolNameLabel: "mp1", }). - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build() machinePool2 := builder.MachinePool(metav1.NamespaceDefault, "mp2"). WithLabels(map[string]string{ @@ -182,8 +182,8 @@ func TestGetCurrentState(t *testing.T) { clusterv1.ClusterTopologyOwnedLabel: "", clusterv1.ClusterTopologyMachinePoolNameLabel: "mp2", }). - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build() tests := []struct { @@ -524,8 +524,8 @@ func TestGetCurrentState(t *testing.T) { clusterv1.ClusterNameLabel: "cluster1", // topology.cluster.x-k8s.io/owned label is missing (unmanaged)! }). - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build(), builder.MachinePool(metav1.NamespaceDefault, "wrong-cluster-label"). WithLabels(map[string]string{ @@ -533,8 +533,8 @@ func TestGetCurrentState(t *testing.T) { clusterv1.ClusterTopologyOwnedLabel: "", clusterv1.ClusterTopologyMachinePoolNameLabel: "mp1", }). - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build(), }, // Expect valid return with empty MachineDeployments and MachinePools properly filtered by label. @@ -611,8 +611,8 @@ func TestGetCurrentState(t *testing.T) { clusterv1.ClusterTopologyOwnedLabel: "", // topology.cluster.x-k8s.io/pool-name label is missing! }). - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build(), }, // Expect error to be thrown as no managed MachinePool is reconcilable unless it has a ClusterTopologyMachinePoolNameLabel. @@ -642,8 +642,8 @@ func TestGetCurrentState(t *testing.T) { machinePool, builder.MachinePool(metav1.NamespaceDefault, "duplicate-labels"). WithLabels(machinePool.Labels). // Another machine pool with the same labels. - WithBootstrapTemplate(machinePoolBootstrap). - WithInfrastructureTemplate(machinePoolInfrastructure). + WithBootstrap(machinePoolBootstrap). + WithInfrastructure(machinePoolInfrastructure). Build(), }, // Expect error as two MachinePools with the same ClusterTopologyOwnedLabel should not exist for one cluster @@ -897,7 +897,7 @@ func TestGetCurrentState(t *testing.T) { builder.MachinePool(metav1.NamespaceDefault, "no-bootstrap"). WithLabels(machinePool.Labels). // No BootstrapTemplate reference! - WithInfrastructureTemplate(machinePoolInfrastructure). + WithInfrastructure(machinePoolInfrastructure). Build(), }, // Expect error as Bootstrap Template not defined for MachinePools relevant to the Cluster. @@ -974,7 +974,7 @@ func TestGetCurrentState(t *testing.T) { machinePoolBootstrap, builder.MachinePool(metav1.NamespaceDefault, "no-infra"). WithLabels(machinePool.Labels). - WithBootstrapTemplate(machinePoolBootstrap). + WithBootstrap(machinePoolBootstrap). // No InfrastructureMachineTemplate reference! Build(), },