@@ -29,7 +29,7 @@ import (
29
29
30
30
"github.com/ydb-platform/ydb-kubernetes-operator/api/v1alpha1"
31
31
testobjects "github.com/ydb-platform/ydb-kubernetes-operator/e2e/tests/test-objects"
32
- ydbannotations "github.com/ydb-platform/ydb-kubernetes-operator/internal/annotations"
32
+ "github.com/ydb-platform/ydb-kubernetes-operator/internal/annotations"
33
33
. "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
34
34
"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database"
35
35
"github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/databasenodeset"
@@ -530,25 +530,25 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
530
530
return err
531
531
}
532
532
533
- primaryResourceStorage , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceStorageAnnotation ]
533
+ primaryResourceStorage , exist := remoteSecret .Annotations [annotations . PrimaryResourceStorage ]
534
534
if ! exist {
535
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . PrimaryResourceStorageAnnotation , remoteSecret .Name )
535
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . PrimaryResourceStorage , remoteSecret .Name )
536
536
}
537
537
if primaryResourceStorage != foundRemoteStorageNodeSet .Spec .StorageRef .Name {
538
538
return fmt .Errorf ("primaryResourceName %s does not equal storageRef name %s" , primaryResourceStorage , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
539
539
}
540
540
541
- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
541
+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
542
542
if ! exist {
543
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . PrimaryResourceDatabaseAnnotation , remoteSecret .Name )
543
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . PrimaryResourceDatabase , remoteSecret .Name )
544
544
}
545
545
if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
546
546
return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
547
547
}
548
548
549
- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
549
+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
550
550
if ! exist {
551
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . RemoteResourceVersionAnnotation , remoteSecret .Name )
551
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . RemoteResourceVersion , remoteSecret .Name )
552
552
}
553
553
if localSecret .GetResourceVersion () != remoteRV {
554
554
return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
@@ -621,22 +621,22 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
621
621
return err
622
622
}
623
623
624
- _ , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceStorageAnnotation ]
624
+ _ , exist := remoteSecret .Annotations [annotations . PrimaryResourceStorage ]
625
625
if exist {
626
- return fmt .Errorf ("annotation %s still exist on remoteSecret %s" , ydbannotations . PrimaryResourceStorageAnnotation , remoteSecret .Name )
626
+ return fmt .Errorf ("annotation %s still exist on remoteSecret %s" , annotations . PrimaryResourceStorage , remoteSecret .Name )
627
627
}
628
628
629
- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
629
+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
630
630
if ! exist {
631
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . PrimaryResourceDatabaseAnnotation , remoteSecret .Name )
631
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . PrimaryResourceDatabase , remoteSecret .Name )
632
632
}
633
633
if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
634
634
return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
635
635
}
636
636
637
- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
637
+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
638
638
if ! exist {
639
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . RemoteResourceVersionAnnotation , remoteSecret .Name )
639
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . RemoteResourceVersion , remoteSecret .Name )
640
640
}
641
641
if localSecret .GetResourceVersion () != remoteRV {
642
642
return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
@@ -687,17 +687,17 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
687
687
return err
688
688
}
689
689
690
- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
690
+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
691
691
if ! exist {
692
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . PrimaryResourceDatabaseAnnotation , remoteSecret .Name )
692
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . PrimaryResourceDatabase , remoteSecret .Name )
693
693
}
694
694
if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
695
695
return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
696
696
}
697
697
698
- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
698
+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
699
699
if ! exist {
700
- return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , ydbannotations . RemoteResourceVersionAnnotation , remoteSecret .Name )
700
+ return fmt .Errorf ("annotation %s does not exist on remoteSecret %s" , annotations . RemoteResourceVersion , remoteSecret .Name )
701
701
}
702
702
if localSecret .GetResourceVersion () != remoteRV {
703
703
return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
0 commit comments