@@ -70,18 +70,18 @@ func newAltinityTestEnv(t *testing.T, app *unstructured.Unstructured, builder *c
7070 Build ()
7171
7272 return & BackupJobReconciler {
73- Client : c ,
74- Interface : dynamicClient ,
75- RESTMapper : restMapper ,
76- Scheme : testScheme ,
77- Recorder : record .NewFakeRecorder (10 ),
78- }, & RestoreJobReconciler {
79- Client : c ,
80- Interface : dynamicClient ,
81- RESTMapper : restMapper ,
82- Scheme : testScheme ,
83- Recorder : record .NewFakeRecorder (10 ),
84- }, testScheme
73+ Client : c ,
74+ Interface : dynamicClient ,
75+ RESTMapper : restMapper ,
76+ Scheme : testScheme ,
77+ Recorder : record .NewFakeRecorder (10 ),
78+ }, & RestoreJobReconciler {
79+ Client : c ,
80+ Interface : dynamicClient ,
81+ RESTMapper : restMapper ,
82+ Scheme : testScheme ,
83+ Recorder : record .NewFakeRecorder (10 ),
84+ }, testScheme
8585}
8686
8787func newAltinityStrategy (name string ) * strategyv1alpha1.Altinity {
@@ -108,7 +108,7 @@ func newAltinityStrategy(name string) *strategyv1alpha1.Altinity {
108108
109109func newAltinityClickHouseRef (name string ) corev1.TypedLocalObjectReference {
110110 return corev1.TypedLocalObjectReference {
111- APIGroup : stringPtr (backupsv1alpha1 .DefaultApplicationAPIGroup ),
111+ APIGroup : new (backupsv1alpha1.DefaultApplicationAPIGroup ),
112112 Kind : "ClickHouse" ,
113113 Name : name ,
114114 }
@@ -128,7 +128,7 @@ func TestReconcileAltinity_CreatesBatchJob(t *testing.T) {
128128
129129 resolved := & ResolvedBackupConfig {
130130 StrategyRef : corev1.TypedLocalObjectReference {
131- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
131+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
132132 Kind : strategyv1alpha1 .AltinityStrategyKind ,
133133 Name : "clickhouse-strategy" ,
134134 },
@@ -224,7 +224,7 @@ func TestReconcileAltinity_CompletesAndCreatesBackup(t *testing.T) {
224224
225225 resolved := & ResolvedBackupConfig {
226226 StrategyRef : corev1.TypedLocalObjectReference {
227- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
227+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
228228 Kind : strategyv1alpha1 .AltinityStrategyKind ,
229229 Name : "clickhouse-strategy" ,
230230 },
@@ -304,7 +304,7 @@ func TestReconcileAltinity_FailsOnJobFailed(t *testing.T) {
304304
305305 resolved := & ResolvedBackupConfig {
306306 StrategyRef : corev1.TypedLocalObjectReference {
307- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
307+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
308308 Kind : strategyv1alpha1 .AltinityStrategyKind ,
309309 Name : "clickhouse-strategy" ,
310310 },
@@ -357,7 +357,7 @@ func TestReconcileAltinityRestore_CreatesBatchJobInTargetNamespace(t *testing.T)
357357 Spec : backupsv1alpha1.BackupSpec {
358358 ApplicationRef : newAltinityClickHouseRef ("ch-test" ),
359359 StrategyRef : corev1.TypedLocalObjectReference {
360- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
360+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
361361 Kind : strategyv1alpha1 .AltinityStrategyKind ,
362362 Name : "clickhouse-strategy" ,
363363 },
@@ -370,7 +370,7 @@ func TestReconcileAltinityRestore_CreatesBatchJobInTargetNamespace(t *testing.T)
370370 Spec : backupsv1alpha1.RestoreJobSpec {
371371 BackupRef : corev1.LocalObjectReference {Name : backup .Name },
372372 TargetApplicationRef : & corev1.TypedLocalObjectReference {
373- APIGroup : stringPtr (backupsv1alpha1 .DefaultApplicationAPIGroup ),
373+ APIGroup : new (backupsv1alpha1.DefaultApplicationAPIGroup ),
374374 Kind : "ClickHouse" ,
375375 Name : "ch-restore" ,
376376 },
@@ -427,7 +427,7 @@ func TestReconcileAltinity_RenderedBackupJobOwnedByBackupJob(t *testing.T) {
427427 }
428428 resolved := & ResolvedBackupConfig {
429429 StrategyRef : corev1.TypedLocalObjectReference {
430- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
430+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
431431 Kind : strategyv1alpha1 .AltinityStrategyKind ,
432432 Name : "clickhouse-strategy" ,
433433 },
@@ -474,7 +474,7 @@ func TestReconcileAltinityRestore_RenderedRestoreJobOwnedByRestoreJob(t *testing
474474 Spec : backupsv1alpha1.BackupSpec {
475475 ApplicationRef : newAltinityClickHouseRef ("ch-test" ),
476476 StrategyRef : corev1.TypedLocalObjectReference {
477- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
477+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
478478 Kind : strategyv1alpha1 .AltinityStrategyKind ,
479479 Name : "clickhouse-strategy" ,
480480 },
@@ -486,7 +486,7 @@ func TestReconcileAltinityRestore_RenderedRestoreJobOwnedByRestoreJob(t *testing
486486 Spec : backupsv1alpha1.RestoreJobSpec {
487487 BackupRef : corev1.LocalObjectReference {Name : backup .Name },
488488 TargetApplicationRef : & corev1.TypedLocalObjectReference {
489- APIGroup : stringPtr (backupsv1alpha1 .DefaultApplicationAPIGroup ),
489+ APIGroup : new (backupsv1alpha1.DefaultApplicationAPIGroup ),
490490 Kind : "ClickHouse" ,
491491 Name : "ch-restore" ,
492492 },
@@ -552,7 +552,7 @@ func TestReconcileAltinityRestore_TargetNamespaceIsRestoreJobNamespace(t *testin
552552 {
553553 name : "full triple targetRef -> to-copy explicit" ,
554554 targetRef : & corev1.TypedLocalObjectReference {
555- APIGroup : stringPtr (backupsv1alpha1 .DefaultApplicationAPIGroup ),
555+ APIGroup : new (backupsv1alpha1.DefaultApplicationAPIGroup ),
556556 Kind : "ClickHouse" ,
557557 Name : "ch-copy" ,
558558 },
@@ -570,7 +570,7 @@ func TestReconcileAltinityRestore_TargetNamespaceIsRestoreJobNamespace(t *testin
570570 Spec : backupsv1alpha1.BackupSpec {
571571 ApplicationRef : newAltinityClickHouseRef ("ch-source" ),
572572 StrategyRef : corev1.TypedLocalObjectReference {
573- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
573+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
574574 Kind : strategyv1alpha1 .AltinityStrategyKind ,
575575 Name : "clickhouse-strategy" ,
576576 },
@@ -647,7 +647,7 @@ func TestReconcileAltinityRestore_ExposesSourceApplicationRef(t *testing.T) {
647647 Spec : backupsv1alpha1.BackupSpec {
648648 ApplicationRef : newAltinityClickHouseRef ("ch-source" ),
649649 StrategyRef : corev1.TypedLocalObjectReference {
650- APIGroup : stringPtr (strategyv1alpha1 .GroupVersion .Group ),
650+ APIGroup : new (strategyv1alpha1.GroupVersion .Group ),
651651 Kind : strategyv1alpha1 .AltinityStrategyKind ,
652652 Name : "clickhouse-strategy" ,
653653 },
@@ -659,7 +659,7 @@ func TestReconcileAltinityRestore_ExposesSourceApplicationRef(t *testing.T) {
659659 Spec : backupsv1alpha1.RestoreJobSpec {
660660 BackupRef : corev1.LocalObjectReference {Name : backup .Name },
661661 TargetApplicationRef : & corev1.TypedLocalObjectReference {
662- APIGroup : stringPtr (backupsv1alpha1 .DefaultApplicationAPIGroup ),
662+ APIGroup : new (backupsv1alpha1.DefaultApplicationAPIGroup ),
663663 Kind : "ClickHouse" ,
664664 Name : "ch-restore" ,
665665 },
0 commit comments