@@ -49,6 +49,7 @@ import (
49
49
func TestSyncSimpleObject (t * testing.T ) {
50
50
const (
51
51
apiExportName = "kcp.example.com"
52
+ kcpGroupName = "kcp.example.com"
52
53
orgWorkspace = "sync-simple"
53
54
)
54
55
@@ -80,6 +81,9 @@ func TestSyncSimpleObject(t *testing.T) {
80
81
Name : "$remoteName" ,
81
82
Namespace : "synced-$remoteNamespace" ,
82
83
},
84
+ Projection : & syncagentv1alpha1.ResourceProjection {
85
+ Group : kcpGroupName ,
86
+ },
83
87
},
84
88
}
85
89
@@ -94,7 +98,7 @@ func TestSyncSimpleObject(t *testing.T) {
94
98
teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
95
99
kcpClient := utils .GetKcpAdminClusterClient (t )
96
100
utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
97
- Group : apiExportName ,
101
+ Group : kcpGroupName ,
98
102
Version : "v1" ,
99
103
Resource : "crontabs" ,
100
104
})
@@ -135,6 +139,7 @@ spec:
135
139
func TestLocalChangesAreKept (t * testing.T ) {
136
140
const (
137
141
apiExportName = "kcp.example.com"
142
+ kcpGroupName = "kcp.example.com"
138
143
orgWorkspace = "sync-undo-local-changes"
139
144
)
140
145
@@ -166,6 +171,9 @@ func TestLocalChangesAreKept(t *testing.T) {
166
171
Name : "$remoteName" ,
167
172
Namespace : "synced-$remoteNamespace" ,
168
173
},
174
+ Projection : & syncagentv1alpha1.ResourceProjection {
175
+ Group : kcpGroupName ,
176
+ },
169
177
},
170
178
}
171
179
@@ -180,7 +188,7 @@ func TestLocalChangesAreKept(t *testing.T) {
180
188
teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
181
189
kcpClient := utils .GetKcpAdminClusterClient (t )
182
190
utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
183
- Group : apiExportName ,
191
+ Group : kcpGroupName ,
184
192
Version : "v1" ,
185
193
Resource : "crontabs" ,
186
194
})
@@ -337,6 +345,7 @@ func yamlToUnstructured(t *testing.T, data string) *unstructured.Unstructured {
337
345
func TestResourceFilter (t * testing.T ) {
338
346
const (
339
347
apiExportName = "kcp.example.com"
348
+ kcpGroupName = "kcp.example.com"
340
349
orgWorkspace = "sync-resource-filter"
341
350
)
342
351
@@ -368,6 +377,9 @@ func TestResourceFilter(t *testing.T) {
368
377
Name : "$remoteName" ,
369
378
Namespace : "synced-$remoteNamespace" ,
370
379
},
380
+ Projection : & syncagentv1alpha1.ResourceProjection {
381
+ Group : kcpGroupName ,
382
+ },
371
383
Filter : & syncagentv1alpha1.ResourceFilter {
372
384
Resource : & metav1.LabelSelector {
373
385
MatchLabels : map [string ]string {
@@ -389,7 +401,7 @@ func TestResourceFilter(t *testing.T) {
389
401
teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
390
402
kcpClient := utils .GetKcpAdminClusterClient (t )
391
403
utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
392
- Group : apiExportName ,
404
+ Group : kcpGroupName ,
393
405
Version : "v1" ,
394
406
Resource : "crontabs" ,
395
407
})
@@ -454,6 +466,7 @@ spec:
454
466
func TestSyncingOverlyLongNames (t * testing.T ) {
455
467
const (
456
468
apiExportName = "kcp.example.com"
469
+ kcpGroupName = "kcp.example.com"
457
470
orgWorkspace = "sync-long-names"
458
471
)
459
472
@@ -485,6 +498,9 @@ func TestSyncingOverlyLongNames(t *testing.T) {
485
498
Name : "$remoteName" ,
486
499
Namespace : "synced-$remoteNamespace" ,
487
500
},
501
+ Projection : & syncagentv1alpha1.ResourceProjection {
502
+ Group : kcpGroupName ,
503
+ },
488
504
},
489
505
}
490
506
@@ -499,7 +515,7 @@ func TestSyncingOverlyLongNames(t *testing.T) {
499
515
teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
500
516
kcpClient := utils .GetKcpAdminClusterClient (t )
501
517
utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
502
- Group : apiExportName ,
518
+ Group : kcpGroupName ,
503
519
Version : "v1" ,
504
520
Resource : "crontabs" ,
505
521
})
0 commit comments