Skip to content

Commit 91711cd

Browse files
author
Yuvaraj Kakaraparthi
committed
unit tests for After hooks and utils
1 parent fc83dfa commit 91711cd

File tree

9 files changed

+1201
-267
lines changed

9 files changed

+1201
-267
lines changed

internal/controllers/cluster/cluster_controller_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131

3232
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
3333
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
34-
3534
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
3635
"sigs.k8s.io/cluster-api/feature"
3736
"sigs.k8s.io/cluster-api/internal/hooks"
@@ -454,7 +453,7 @@ func TestClusterReconciler_reconcileDelete(t *testing.T) {
454453
Namespace: "test-ns",
455454
Annotations: map[string]string{
456455
// If the hook is already marked the hook should not be called during cluster delete.
457-
"hooks.x-cluster.k8s.io/marked-hooks": "BeforeClusterDelete",
456+
hooks.HookMarkerAnnotationKey: "BeforeClusterDelete",
458457
},
459458
},
460459
Spec: clusterv1.ClusterSpec{},

0 commit comments

Comments
 (0)