@@ -41,11 +41,12 @@ func TestWorkspaceOIDC(t *testing.T) {
4141 framework .Suite (t , "control-plane" )
4242
4343 ctx := context .Background ()
44- rootPath := logicalcluster .NewPath ("root" )
4544
4645 // start kcp and setup clients
4746 server := kcptesting .SharedKcpServer (t )
4847
48+ baseWsPath , _ := kcptesting .NewWorkspaceFixture (t , server , logicalcluster .NewPath ("root" ), kcptesting .WithNamePrefix ("oidc" ))
49+
4950 kcpConfig := server .BaseConfig (t )
5051 kubeClusterClient , err := kcpkubernetesclientset .NewForConfig (kcpConfig )
5152 require .NoError (t , err )
@@ -70,7 +71,7 @@ func TestWorkspaceOIDC(t *testing.T) {
7071 }
7172
7273 t .Log ("Creating WorkspaceAuthenticationConfguration..." )
73- _ , err = kcpClusterClient .Cluster (rootPath ).TenancyV1alpha1 ().WorkspaceAuthenticationConfigurations ().Create (ctx , authConfig , metav1.CreateOptions {})
74+ _ , err = kcpClusterClient .Cluster (baseWsPath ).TenancyV1alpha1 ().WorkspaceAuthenticationConfigurations ().Create (ctx , authConfig , metav1.CreateOptions {})
7475 require .NoError (t , err )
7576
7677 // use this config in a new WorkspaceType
@@ -86,12 +87,12 @@ func TestWorkspaceOIDC(t *testing.T) {
8687 }
8788
8889 t .Log ("Creating WorkspaceType..." )
89- _ , err = kcpClusterClient .Cluster (rootPath ).TenancyV1alpha1 ().WorkspaceTypes ().Create (ctx , wsType , metav1.CreateOptions {})
90+ _ , err = kcpClusterClient .Cluster (baseWsPath ).TenancyV1alpha1 ().WorkspaceTypes ().Create (ctx , wsType , metav1.CreateOptions {})
9091 require .NoError (t , err )
9192
9293 // create a new workspace with our new type
9394 t .Log ("Creating Workspace..." )
94- team1Path , _ := kcptesting .NewWorkspaceFixture (t , server , rootPath , kcptesting .WithName ("team1" ), kcptesting .WithType (rootPath , tenancyv1alpha1 .WorkspaceTypeName (wsType .Name )))
95+ team1Path , _ := kcptesting .NewWorkspaceFixture (t , server , baseWsPath , kcptesting .WithName ("team1" ), kcptesting .WithType (baseWsPath , tenancyv1alpha1 .WorkspaceTypeName (wsType .Name )))
9596
9697 // grant permissions to OIDC user
9798
0 commit comments