@@ -8,14 +8,14 @@ import (
8
8
"github.com/sirupsen/logrus/hooks/test"
9
9
"github.com/stretchr/testify/assert"
10
10
"github.com/stretchr/testify/require"
11
- "k8s.io/client-go/metadata/metadatalister"
12
-
13
11
"k8s.io/apimachinery/pkg/api/errors"
14
12
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15
13
"k8s.io/apimachinery/pkg/labels"
14
+ "k8s.io/client-go/metadata/metadatalister"
16
15
ktesting "k8s.io/client-go/testing"
17
16
18
17
"github.com/operator-framework/api/pkg/operators/v1alpha1"
18
+
19
19
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned/fake"
20
20
)
21
21
@@ -48,8 +48,8 @@ func TestCopyToNamespace(t *testing.T) {
48
48
StatusHash : "hs" ,
49
49
Prototype : v1alpha1.ClusterServiceVersion {
50
50
ObjectMeta : metav1.ObjectMeta {
51
- Name : "name" ,
52
- Annotations : map [string ]string {},
51
+ Name : "name" ,
52
+ Annotations : map [string ]string {},
53
53
},
54
54
Spec : v1alpha1.ClusterServiceVersionSpec {
55
55
Replaces : "replacee" ,
@@ -63,9 +63,9 @@ func TestCopyToNamespace(t *testing.T) {
63
63
ObjectMeta : metav1.ObjectMeta {
64
64
Name : "name" ,
65
65
Namespace : "to" ,
66
- Annotations : map [string ]string {
67
- nonStatusCopyHashAnnotation : "hn-1" ,
68
- },
66
+ Annotations : map [string ]string {
67
+ nonStatusCopyHashAnnotation : "hn-1" ,
68
+ },
69
69
},
70
70
Spec : v1alpha1.ClusterServiceVersionSpec {
71
71
Replaces : "replacee" ,
@@ -86,13 +86,13 @@ func TestCopyToNamespace(t *testing.T) {
86
86
Phase : "waxing gibbous" ,
87
87
},
88
88
}),
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
+ }),
96
96
},
97
97
ExpectedResult : & v1alpha1.ClusterServiceVersion {
98
98
ObjectMeta : metav1.ObjectMeta {
@@ -109,8 +109,8 @@ func TestCopyToNamespace(t *testing.T) {
109
109
StatusHash : "hs" ,
110
110
Prototype : v1alpha1.ClusterServiceVersion {
111
111
ObjectMeta : metav1.ObjectMeta {
112
- Name : "name" ,
113
- Annotations : map [string ]string {},
112
+ Name : "name" ,
113
+ Annotations : map [string ]string {},
114
114
},
115
115
Spec : v1alpha1.ClusterServiceVersionSpec {
116
116
Replaces : "replacee" ,
@@ -163,8 +163,8 @@ func TestCopyToNamespace(t *testing.T) {
163
163
StatusHash : "hs-1" ,
164
164
Prototype : v1alpha1.ClusterServiceVersion {
165
165
ObjectMeta : metav1.ObjectMeta {
166
- Name : "name" ,
167
- Annotations : map [string ]string {},
166
+ Name : "name" ,
167
+ Annotations : map [string ]string {},
168
168
},
169
169
Spec : v1alpha1.ClusterServiceVersionSpec {
170
170
Replaces : "replacee" ,
@@ -217,8 +217,8 @@ func TestCopyToNamespace(t *testing.T) {
217
217
StatusHash : "hs-1" ,
218
218
Prototype : v1alpha1.ClusterServiceVersion {
219
219
ObjectMeta : metav1.ObjectMeta {
220
- Name : "name" ,
221
- Annotations : map [string ]string {},
220
+ Name : "name" ,
221
+ Annotations : map [string ]string {},
222
222
},
223
223
Spec : v1alpha1.ClusterServiceVersionSpec {
224
224
Replaces : "replacee" ,
@@ -285,8 +285,8 @@ func TestCopyToNamespace(t *testing.T) {
285
285
StatusHash : "hs" ,
286
286
Prototype : v1alpha1.ClusterServiceVersion {
287
287
ObjectMeta : metav1.ObjectMeta {
288
- Name : "name" ,
289
- Annotations : map [string ]string {},
288
+ Name : "name" ,
289
+ Annotations : map [string ]string {},
290
290
},
291
291
},
292
292
ExistingCopy : & metav1.PartialObjectMetadata {
0 commit comments