@@ -97,10 +97,10 @@ func TestSyncSimpleObject(t *testing.T) {
9797 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
9898 teamClient := kcpClusterClient .Cluster (teamClusterPath )
9999
100- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
101- Group : kcpGroupName ,
102- Version : "v1" ,
103- Resource : "crontabs " ,
100+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
101+ Group : kcpGroupName ,
102+ Version : "v1" ,
103+ Kind : "CronTab " ,
104104 })
105105
106106 // create a Crontab object in a team workspace
@@ -190,10 +190,10 @@ func TestSyncSimpleObjectOldNaming(t *testing.T) {
190190 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
191191 teamClient := kcpClusterClient .Cluster (teamClusterPath )
192192
193- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
194- Group : kcpGroupName ,
195- Version : "v1" ,
196- Resource : "crontabs " ,
193+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
194+ Group : kcpGroupName ,
195+ Version : "v1" ,
196+ Kind : "CronTab " ,
197197 })
198198
199199 // create a Crontab object in a team workspace
@@ -274,10 +274,10 @@ func TestSyncWithDefaultNamingRules(t *testing.T) {
274274 // wait until the API is available
275275 kcpClusterClient := utils .GetKcpAdminClusterClient (t )
276276
277- crontabsGVR := schema.GroupVersionResource {
278- Group : "kcp.example.com" ,
279- Version : "v1" ,
280- Resource : "crontabs " ,
277+ crontabsGVK := schema.GroupVersionKind {
278+ Group : "kcp.example.com" ,
279+ Version : "v1" ,
280+ Kind : "CronTab " ,
281281 }
282282
283283 // create a Crontab object in each team workspace, importantly using the same name and
@@ -298,7 +298,7 @@ spec:
298298 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join (team )
299299 teamClient := kcpClusterClient .Cluster (teamClusterPath )
300300
301- utils .WaitForBoundAPI (t , ctx , teamClient , crontabsGVR )
301+ utils .WaitForBoundAPI (t , ctx , teamClient , crontabsGVK )
302302
303303 if err := teamClient .Create (ctx , utils .YAMLToUnstructured (t , crontabYAML )); err != nil {
304304 t .Fatalf ("Failed to create %s's CronTab in kcp: %v" , team , err )
@@ -380,10 +380,10 @@ func TestLocalChangesAreKept(t *testing.T) {
380380 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
381381 teamClient := kcpClusterClient .Cluster (teamClusterPath )
382382
383- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
384- Group : kcpGroupName ,
385- Version : "v1" ,
386- Resource : "crontabs " ,
383+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
384+ Group : kcpGroupName ,
385+ Version : "v1" ,
386+ Kind : "CronTab " ,
387387 })
388388
389389 // create a Crontab object in a team workspace
@@ -577,10 +577,10 @@ func TestResourceFilter(t *testing.T) {
577577 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
578578 teamClient := kcpClusterClient .Cluster (teamClusterPath )
579579
580- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
581- Group : kcpGroupName ,
582- Version : "v1" ,
583- Resource : "crontabs " ,
580+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
581+ Group : kcpGroupName ,
582+ Version : "v1" ,
583+ Kind : "CronTab " ,
584584 })
585585
586586 // create two Crontab objects in a team workspace
@@ -694,10 +694,10 @@ func TestSyncingOverlyLongNames(t *testing.T) {
694694 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
695695 teamClient := kcpClusterClient .Cluster (teamClusterPath )
696696
697- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
698- Group : kcpGroupName ,
699- Version : "v1" ,
700- Resource : "crontabs " ,
697+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
698+ Group : kcpGroupName ,
699+ Version : "v1" ,
700+ Kind : "CronTab " ,
701701 })
702702
703703 // create a namespace and CronTab with extremely long names
@@ -796,10 +796,10 @@ func TestSyncWithWorkspacePath(t *testing.T) {
796796 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
797797 teamClient := kcpClusterClient .Cluster (teamClusterPath )
798798
799- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
800- Group : kcpGroupName ,
801- Version : "v1" ,
802- Resource : "crontabs " ,
799+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
800+ Group : kcpGroupName ,
801+ Version : "v1" ,
802+ Kind : "CronTab " ,
803803 })
804804
805805 // create a Crontab object in a team workspace
@@ -921,10 +921,10 @@ func TestSyncMultiResources(t *testing.T) {
921921 teamClusterPath := logicalcluster .NewPath ("root" ).Join (orgWorkspace ).Join ("team-1" )
922922 teamClient := kcpClusterClient .Cluster (teamClusterPath )
923923
924- utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionResource {
925- Group : kcpGroupName ,
926- Version : "v1" ,
927- Resource : "crontabs " ,
924+ utils .WaitForBoundAPI (t , ctx , teamClient , schema.GroupVersionKind {
925+ Group : kcpGroupName ,
926+ Version : "v1" ,
927+ Kind : "CronTab " ,
928928 })
929929
930930 // create a Crontab object in a team workspace
0 commit comments