@@ -8,14 +8,14 @@ import (
88 "github.com/sirupsen/logrus/hooks/test"
99 "github.com/stretchr/testify/assert"
1010 "github.com/stretchr/testify/require"
11- "k8s.io/client-go/metadata/metadatalister"
12-
1311 "k8s.io/apimachinery/pkg/api/errors"
1412 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1513 "k8s.io/apimachinery/pkg/labels"
14+ "k8s.io/client-go/metadata/metadatalister"
1615 ktesting "k8s.io/client-go/testing"
1716
1817 "github.com/operator-framework/api/pkg/operators/v1alpha1"
18+
1919 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned/fake"
2020)
2121
@@ -48,8 +48,8 @@ func TestCopyToNamespace(t *testing.T) {
4848 StatusHash : "hs" ,
4949 Prototype : v1alpha1.ClusterServiceVersion {
5050 ObjectMeta : metav1.ObjectMeta {
51- Name : "name" ,
52- Annotations : map [string ]string {},
51+ Name : "name" ,
52+ Annotations : map [string ]string {},
5353 },
5454 Spec : v1alpha1.ClusterServiceVersionSpec {
5555 Replaces : "replacee" ,
@@ -63,9 +63,9 @@ func TestCopyToNamespace(t *testing.T) {
6363 ObjectMeta : metav1.ObjectMeta {
6464 Name : "name" ,
6565 Namespace : "to" ,
66- Annotations : map [string ]string {
67- nonStatusCopyHashAnnotation : "hn-1" ,
68- },
66+ Annotations : map [string ]string {
67+ nonStatusCopyHashAnnotation : "hn-1" ,
68+ },
6969 },
7070 Spec : v1alpha1.ClusterServiceVersionSpec {
7171 Replaces : "replacee" ,
@@ -86,13 +86,13 @@ func TestCopyToNamespace(t *testing.T) {
8686 Phase : "waxing gibbous" ,
8787 },
8888 }),
89- ktesting .NewUpdateAction (gvr , "to" , & v1alpha1.ClusterServiceVersion {
90- ObjectMeta : metav1.ObjectMeta {
91- Annotations : map [string ]string {
92- statusCopyHashAnnotation : "hs" ,
93- },
94- },
95- })
89+ ktesting .NewUpdateAction (gvr , "to" , & v1alpha1.ClusterServiceVersion {
90+ ObjectMeta : metav1.ObjectMeta {
91+ Annotations : map [string ]string {
92+ statusCopyHashAnnotation : "hs" ,
93+ },
94+ },
95+ }),
9696 },
9797 ExpectedResult : & v1alpha1.ClusterServiceVersion {
9898 ObjectMeta : metav1.ObjectMeta {
@@ -109,8 +109,8 @@ func TestCopyToNamespace(t *testing.T) {
109109 StatusHash : "hs" ,
110110 Prototype : v1alpha1.ClusterServiceVersion {
111111 ObjectMeta : metav1.ObjectMeta {
112- Name : "name" ,
113- Annotations : map [string ]string {},
112+ Name : "name" ,
113+ Annotations : map [string ]string {},
114114 },
115115 Spec : v1alpha1.ClusterServiceVersionSpec {
116116 Replaces : "replacee" ,
@@ -163,8 +163,8 @@ func TestCopyToNamespace(t *testing.T) {
163163 StatusHash : "hs-1" ,
164164 Prototype : v1alpha1.ClusterServiceVersion {
165165 ObjectMeta : metav1.ObjectMeta {
166- Name : "name" ,
167- Annotations : map [string ]string {},
166+ Name : "name" ,
167+ Annotations : map [string ]string {},
168168 },
169169 Spec : v1alpha1.ClusterServiceVersionSpec {
170170 Replaces : "replacee" ,
@@ -217,8 +217,8 @@ func TestCopyToNamespace(t *testing.T) {
217217 StatusHash : "hs-1" ,
218218 Prototype : v1alpha1.ClusterServiceVersion {
219219 ObjectMeta : metav1.ObjectMeta {
220- Name : "name" ,
221- Annotations : map [string ]string {},
220+ Name : "name" ,
221+ Annotations : map [string ]string {},
222222 },
223223 Spec : v1alpha1.ClusterServiceVersionSpec {
224224 Replaces : "replacee" ,
@@ -285,8 +285,8 @@ func TestCopyToNamespace(t *testing.T) {
285285 StatusHash : "hs" ,
286286 Prototype : v1alpha1.ClusterServiceVersion {
287287 ObjectMeta : metav1.ObjectMeta {
288- Name : "name" ,
289- Annotations : map [string ]string {},
288+ Name : "name" ,
289+ Annotations : map [string ]string {},
290290 },
291291 },
292292 ExistingCopy : & metav1.PartialObjectMetadata {
0 commit comments