@@ -70,17 +70,19 @@ func TestMountsMachinery(t *testing.T) {
7070 ctx , cancelFunc := context .WithCancel (context .Background ())
7171 t .Cleanup (cancelFunc )
7272
73- _ , _ = kcptesting .NewWorkspaceFixture (t , server , core .RootCluster .Path ())
74-
75- orgSource , _ := kcptesting .NewWorkspaceFixture (t , server , core .RootCluster .Path (),
76- kcptesting .WithName ("source" ),
77- kcptesting .WithType (core .RootCluster .Path (), "organization" ))
78- orgDestination , _ := kcptesting .NewWorkspaceFixture (t , server , core .RootCluster .Path (),
79- kcptesting .WithName ("destination" ),
80- kcptesting .WithType (core .RootCluster .Path (), "organization" ))
81-
82- sourcePath , _ := kcptesting .NewWorkspaceFixture (t , server , orgSource , kcptesting .WithName ("source" ))
83- _ , destinationWorkspaceObj := kcptesting .NewWorkspaceFixture (t , server , orgDestination , kcptesting .WithName ("destination" ))
73+ // This will create structure as bellow for testing:
74+ // └── root
75+ // └── e2e-workspace-n784f
76+ // ├── destination
77+ // └── source
78+ // └── mount
79+ //
80+ rootOrg , _ := kcptesting .NewWorkspaceFixture (t , server , core .RootCluster .Path ())
81+
82+ sourcePath , _ := kcptesting .NewWorkspaceFixture (t , server , rootOrg ,
83+ kcptesting .WithName ("source" ))
84+ _ , destinationWorkspaceObj := kcptesting .NewWorkspaceFixture (t , server , rootOrg ,
85+ kcptesting .WithName ("destination" ))
8486
8587 cfg := server .BaseConfig (t )
8688 kcpClusterClient , err := kcpclientset .NewForConfig (cfg )
@@ -142,7 +144,7 @@ func TestMountsMachinery(t *testing.T) {
142144 Resource : "kubeclusters" ,
143145 }
144146 err = retry .RetryOnConflict (retry .DefaultRetry , func () error {
145- destinationWorkspace , err := kcpClusterClient .Cluster (orgDestination ).TenancyV1alpha1 ().Workspaces ().Get (ctx , destinationWorkspaceObj .Name , metav1.GetOptions {})
147+ destinationWorkspace , err := kcpClusterClient .Cluster (rootOrg ).TenancyV1alpha1 ().Workspaces ().Get (ctx , destinationWorkspaceObj .Name , metav1.GetOptions {})
146148 require .NoError (t , err )
147149
148150 if destinationWorkspace .Spec .URL == "" {
0 commit comments