Skip to content

Commit f68fd20

Browse files
committed
Fix some copy-pasta errors in docker tests
1 parent 35f0c63 commit f68fd20

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/framework/finalizers_helpers.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
3636
addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1beta1"
3737
infrav1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1"
38+
infraexpv1 "sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1"
3839
"sigs.k8s.io/cluster-api/util/patch"
3940
)
4041

@@ -65,7 +66,7 @@ var ExpFinalizersAssertion = map[string]func(types.NamespacedName) []string{
6566
var DockerInfraFinalizersAssertion = map[string]func(types.NamespacedName) []string{
6667
dockerMachineKind: func(_ types.NamespacedName) []string { return []string{infrav1.MachineFinalizer} },
6768
dockerClusterKind: func(_ types.NamespacedName) []string { return []string{infrav1.ClusterFinalizer} },
68-
dockerMachinePoolKind: func(_ types.NamespacedName) []string { return []string{clusterv1.MachinePoolFinalizer} },
69+
dockerMachinePoolKind: func(_ types.NamespacedName) []string { return []string{infraexpv1.MachinePoolFinalizer} },
6970
}
7071

7172
// KubeadmControlPlaneFinalizersAssertion maps Kubeadm resource types to their expected finalizers.

test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (r *DockerMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Re
146146
// Add finalizer and the InfrastructureMachineKind if they aren't already present, and requeue if either were added.
147147
// We want to add the finalizer here to avoid the race condition between init and delete.
148148
// Note: Finalizers in general can only be added when the deletionTimestamp is not set.
149-
needsPatch := controllerutil.AddFinalizer(dockerMachinePool, clusterv1.MachinePoolFinalizer)
149+
needsPatch := controllerutil.AddFinalizer(dockerMachinePool, infraexpv1.MachinePoolFinalizer)
150150
needsPatch = setInfrastructureMachineKind(dockerMachinePool) || needsPatch
151151
if needsPatch {
152152
return ctrl.Result{}, nil
@@ -255,7 +255,7 @@ func (r *DockerMachinePoolReconciler) reconcileDelete(ctx context.Context, clust
255255
}
256256

257257
// Once all DockerMachines and Docker containers are deleted, remove the finalizer.
258-
controllerutil.RemoveFinalizer(dockerMachinePool, clusterv1.MachinePoolFinalizer)
258+
controllerutil.RemoveFinalizer(dockerMachinePool, infraexpv1.MachinePoolFinalizer)
259259

260260
return nil
261261
}

0 commit comments

Comments
 (0)