@@ -29,7 +29,7 @@ import (
2929
3030 "github.com/ydb-platform/ydb-kubernetes-operator/api/v1alpha1"
3131 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"
3333 . "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
3434 "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database"
3535 "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/databasenodeset"
@@ -530,25 +530,25 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
530530 return err
531531 }
532532
533- primaryResourceStorage , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceStorageAnnotation ]
533+ primaryResourceStorage , exist := remoteSecret .Annotations [annotations . PrimaryResourceStorage ]
534534 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 )
536536 }
537537 if primaryResourceStorage != foundRemoteStorageNodeSet .Spec .StorageRef .Name {
538538 return fmt .Errorf ("primaryResourceName %s does not equal storageRef name %s" , primaryResourceStorage , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
539539 }
540540
541- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
541+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
542542 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 )
544544 }
545545 if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
546546 return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
547547 }
548548
549- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
549+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
550550 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 )
552552 }
553553 if localSecret .GetResourceVersion () != remoteRV {
554554 return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
@@ -621,22 +621,22 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
621621 return err
622622 }
623623
624- _ , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceStorageAnnotation ]
624+ _ , exist := remoteSecret .Annotations [annotations . PrimaryResourceStorage ]
625625 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 )
627627 }
628628
629- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
629+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
630630 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 )
632632 }
633633 if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
634634 return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
635635 }
636636
637- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
637+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
638638 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 )
640640 }
641641 if localSecret .GetResourceVersion () != remoteRV {
642642 return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
@@ -687,17 +687,17 @@ var _ = Describe("RemoteDatabaseNodeSet controller tests", func() {
687687 return err
688688 }
689689
690- primaryResourceDatabase , exist := remoteSecret .Annotations [ydbannotations . PrimaryResourceDatabaseAnnotation ]
690+ primaryResourceDatabase , exist := remoteSecret .Annotations [annotations . PrimaryResourceDatabase ]
691691 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 )
693693 }
694694 if primaryResourceDatabase != foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name {
695695 return fmt .Errorf ("primaryResourceName %s does not equal databaseRef name %s" , primaryResourceDatabase , foundRemoteDatabaseNodeSet .Spec .DatabaseRef .Name )
696696 }
697697
698- remoteRV , exist := remoteSecret .Annotations [ydbannotations . RemoteResourceVersionAnnotation ]
698+ remoteRV , exist := remoteSecret .Annotations [annotations . RemoteResourceVersion ]
699699 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 )
701701 }
702702 if localSecret .GetResourceVersion () != remoteRV {
703703 return fmt .Errorf ("localRV %s does not equal remoteRV %s" , localSecret .GetResourceVersion (), remoteRV )
0 commit comments