@@ -20,7 +20,6 @@ import (
2020
2121 "github.com/google/go-cmp/cmp"
2222 configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
23- hashutil "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/util/hash"
2423 "github.com/sirupsen/logrus"
2524 "github.com/stretchr/testify/assert"
2625 "github.com/stretchr/testify/require"
@@ -44,6 +43,7 @@ import (
4443 metadatafake "k8s.io/client-go/metadata/fake"
4544 "k8s.io/client-go/pkg/version"
4645 "k8s.io/client-go/rest"
46+ clienttesting "k8s.io/client-go/testing"
4747 "k8s.io/client-go/tools/cache"
4848 "k8s.io/client-go/tools/record"
4949 apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
@@ -54,7 +54,6 @@ import (
5454 operatorsv1 "github.com/operator-framework/api/pkg/operators/v1"
5555 "github.com/operator-framework/api/pkg/operators/v1alpha1"
5656 opregistry "github.com/operator-framework/operator-registry/pkg/registry"
57- clienttesting "k8s.io/client-go/testing"
5857
5958 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
6059 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned/fake"
@@ -64,6 +63,7 @@ import (
6463 resolvercache "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry/resolver/cache"
6564 "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/clientfake"
6665 csvutility "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/csv"
66+ hashutil "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/kubernetes/pkg/util/hash"
6767 "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/labeler"
6868 "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient"
6969 "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
@@ -5050,7 +5050,12 @@ func TestSyncOperatorGroups(t *testing.T) {
50505050 },
50515051 targetNamespace : {
50525052 withLabels (
5053- withAnnotations (targetCSV .DeepCopy (), map [string ]string {operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" , operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace }),
5053+ withAnnotations (targetCSV .DeepCopy (), map [string ]string {
5054+ operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" ,
5055+ operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace ,
5056+ "olm.operatorframework.io/nonStatusCopyHash" : "9ZxHAHQTkxzAQd7Qkk4Qjz3VAkA8lXwuX9mDX6" ,
5057+ "olm.operatorframework.io/statusCopyHash" : "bedtcmN999WBSJ1RHvM7JfN2NJITrUjJ0g0MoH" ,
5058+ }),
50545059 labels .Merge (targetCSV .GetLabels (), map [string ]string {v1alpha1 .CopiedLabelKey : operatorNamespace }),
50555060 ),
50565061 & rbacv1.Role {
@@ -5155,7 +5160,12 @@ func TestSyncOperatorGroups(t *testing.T) {
51555160 },
51565161 targetNamespace : {
51575162 withLabels (
5158- withAnnotations (targetCSV .DeepCopy (), map [string ]string {operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" , operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace }),
5163+ withAnnotations (targetCSV .DeepCopy (), map [string ]string {
5164+ operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" ,
5165+ operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace ,
5166+ "olm.operatorframework.io/nonStatusCopyHash" : "9ZxHAHQTkxzAQd7Qkk4Qjz3VAkA8lXwuX9mDX6" ,
5167+ "olm.operatorframework.io/statusCopyHash" : "bedtcmN999WBSJ1RHvM7JfN2NJITrUjJ0g0MoH" ,
5168+ }),
51595169 labels .Merge (targetCSV .GetLabels (), map [string ]string {v1alpha1 .CopiedLabelKey : operatorNamespace }),
51605170 ),
51615171 & rbacv1.Role {
@@ -5312,7 +5322,12 @@ func TestSyncOperatorGroups(t *testing.T) {
53125322 },
53135323 targetNamespace : {
53145324 withLabels (
5315- withAnnotations (targetCSV .DeepCopy (), map [string ]string {operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" , operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace }),
5325+ withAnnotations (targetCSV .DeepCopy (), map [string ]string {
5326+ operatorsv1 .OperatorGroupAnnotationKey : "operator-group-1" ,
5327+ operatorsv1 .OperatorGroupNamespaceAnnotationKey : operatorNamespace ,
5328+ "olm.operatorframework.io/nonStatusCopyHash" : "9ZxHAHQTkxzAQd7Qkk4Qjz3VAkA8lXwuX9mDX6" ,
5329+ "olm.operatorframework.io/statusCopyHash" : "bedtcmN999WBSJ1RHvM7JfN2NJITrUjJ0g0MoH" ,
5330+ }),
53165331 labels .Merge (targetCSV .GetLabels (), map [string ]string {v1alpha1 .CopiedLabelKey : operatorNamespace }),
53175332 ),
53185333 },
0 commit comments