File tree 2 files changed +9
-1
lines changed
controllers/topology/cluster
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) {
55
55
s : & scope.Scope {
56
56
HookResponseTracker : func () * scope.HookResponseTracker {
57
57
hrt := scope .NewHookResponseTracker ()
58
- hrt .Add (" BeforeClusterUpgrade" , & runtimehooksv1.BeforeClusterUpgradeResponse {
58
+ hrt .Add (runtimehooksv1 . BeforeClusterUpgrade , & runtimehooksv1.BeforeClusterUpgradeResponse {
59
59
CommonRetryResponse : runtimehooksv1.CommonRetryResponse {
60
60
RetryAfterSeconds : int32 (10 ),
61
61
},
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
"k8s.io/apimachinery/pkg/runtime"
29
29
"k8s.io/apimachinery/pkg/runtime/schema"
30
30
31
+ "sigs.k8s.io/cluster-api/internal/runtime/catalog"
31
32
runtimecatalog "sigs.k8s.io/cluster-api/internal/runtime/catalog"
32
33
"sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha1"
33
34
"sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha2"
@@ -175,6 +176,13 @@ func TestValidateResponse(t *testing.T) {
175
176
}
176
177
}
177
178
179
+ func TestHookName (t * testing.T ) {
180
+ g := NewWithT (t )
181
+ expected := "FakeHook"
182
+ actual := catalog .HookName (v1alpha1 .FakeHook )
183
+ g .Expect (actual ).To (Equal (expected ))
184
+ }
185
+
178
186
type GoodRequest struct {
179
187
metav1.TypeMeta `json:",inline"`
180
188
You can’t perform that action at this time.
0 commit comments