Skip to content

Commit

Permalink
unit tests for After hooks and utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed Jun 13, 2022
1 parent fc83dfa commit 91711cd
Show file tree
Hide file tree
Showing 9 changed files with 1,201 additions and 267 deletions.
3 changes: 1 addition & 2 deletions internal/controllers/cluster/cluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"

runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
"sigs.k8s.io/cluster-api/feature"
"sigs.k8s.io/cluster-api/internal/hooks"
Expand Down Expand Up @@ -454,7 +453,7 @@ func TestClusterReconciler_reconcileDelete(t *testing.T) {
Namespace: "test-ns",
Annotations: map[string]string{
// If the hook is already marked the hook should not be called during cluster delete.
"hooks.x-cluster.k8s.io/marked-hooks": "BeforeClusterDelete",
hooks.HookMarkerAnnotationKey: "BeforeClusterDelete",
},
},
Spec: clusterv1.ClusterSpec{},
Expand Down
Loading

0 comments on commit 91711cd

Please sign in to comment.