@@ -49,6 +49,7 @@ import (
4949func TestSyncSimpleObject (t * testing.T ) {
5050 const (
5151 apiExportName = "kcp.example.com"
52+ kcpGroupName = "kcp.example.com"
5253 orgWorkspace = "sync-simple"
5354 )
5455
@@ -80,6 +81,9 @@ func TestSyncSimpleObject(t *testing.T) {
8081 Name : "$remoteName" ,
8182 Namespace : "synced-$remoteNamespace" ,
8283 },
84+ Projection : & syncagentv1alpha1.ResourceProjection {
85+ Group : kcpGroupName ,
86+ },
8387 },
8488 }
8589
@@ -94,7 +98,7 @@ func TestSyncSimpleObject(t *testing.T) {
9498 teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
9599 kcpClient := utils .GetKcpAdminClusterClient (t )
96100 utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
97- Group : apiExportName ,
101+ Group : kcpGroupName ,
98102 Version : "v1" ,
99103 Resource : "crontabs" ,
100104 })
@@ -135,6 +139,7 @@ spec:
135139func TestLocalChangesAreKept (t * testing.T ) {
136140 const (
137141 apiExportName = "kcp.example.com"
142+ kcpGroupName = "kcp.example.com"
138143 orgWorkspace = "sync-undo-local-changes"
139144 )
140145
@@ -166,6 +171,9 @@ func TestLocalChangesAreKept(t *testing.T) {
166171 Name : "$remoteName" ,
167172 Namespace : "synced-$remoteNamespace" ,
168173 },
174+ Projection : & syncagentv1alpha1.ResourceProjection {
175+ Group : kcpGroupName ,
176+ },
169177 },
170178 }
171179
@@ -180,7 +188,7 @@ func TestLocalChangesAreKept(t *testing.T) {
180188 teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
181189 kcpClient := utils .GetKcpAdminClusterClient (t )
182190 utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
183- Group : apiExportName ,
191+ Group : kcpGroupName ,
184192 Version : "v1" ,
185193 Resource : "crontabs" ,
186194 })
@@ -337,6 +345,7 @@ func yamlToUnstructured(t *testing.T, data string) *unstructured.Unstructured {
337345func TestResourceFilter (t * testing.T ) {
338346 const (
339347 apiExportName = "kcp.example.com"
348+ kcpGroupName = "kcp.example.com"
340349 orgWorkspace = "sync-resource-filter"
341350 )
342351
@@ -368,6 +377,9 @@ func TestResourceFilter(t *testing.T) {
368377 Name : "$remoteName" ,
369378 Namespace : "synced-$remoteNamespace" ,
370379 },
380+ Projection : & syncagentv1alpha1.ResourceProjection {
381+ Group : kcpGroupName ,
382+ },
371383 Filter : & syncagentv1alpha1.ResourceFilter {
372384 Resource : & metav1.LabelSelector {
373385 MatchLabels : map [string ]string {
@@ -389,7 +401,7 @@ func TestResourceFilter(t *testing.T) {
389401 teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
390402 kcpClient := utils .GetKcpAdminClusterClient (t )
391403 utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
392- Group : apiExportName ,
404+ Group : kcpGroupName ,
393405 Version : "v1" ,
394406 Resource : "crontabs" ,
395407 })
@@ -454,6 +466,7 @@ spec:
454466func TestSyncingOverlyLongNames (t * testing.T ) {
455467 const (
456468 apiExportName = "kcp.example.com"
469+ kcpGroupName = "kcp.example.com"
457470 orgWorkspace = "sync-long-names"
458471 )
459472
@@ -485,6 +498,9 @@ func TestSyncingOverlyLongNames(t *testing.T) {
485498 Name : "$remoteName" ,
486499 Namespace : "synced-$remoteNamespace" ,
487500 },
501+ Projection : & syncagentv1alpha1.ResourceProjection {
502+ Group : kcpGroupName ,
503+ },
488504 },
489505 }
490506
@@ -499,7 +515,7 @@ func TestSyncingOverlyLongNames(t *testing.T) {
499515 teamCtx := kontext .WithCluster (ctx , logicalcluster .Name (fmt .Sprintf ("root:%s:team-1" , orgWorkspace )))
500516 kcpClient := utils .GetKcpAdminClusterClient (t )
501517 utils .WaitForBoundAPI (t , teamCtx , kcpClient , schema.GroupVersionResource {
502- Group : apiExportName ,
518+ Group : kcpGroupName ,
503519 Version : "v1" ,
504520 Resource : "crontabs" ,
505521 })
0 commit comments