File tree Expand file tree Collapse file tree
Features/RealReadOnlyBranches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ public function testBucketsVisibilityBetweenBranchWorkspaces(): void
108108 true ,
109109 true ,
110110 $ devClient ,
111+ $ this ->workspaceSapiClient ->getBranchAwareClient ($ branchId ),
111112 );
112113 $ wsDevBackend = WorkspaceBackendFactory::createWorkspaceBackend ($ wsDev , true );
113114 /**
Original file line number Diff line number Diff line change @@ -44,17 +44,21 @@ protected function initTestWorkspace(
4444 array $ options = [],
4545 bool $ forceRecreate = false ,
4646 bool $ async = true ,
47- ?Client $ client = null
47+ ?Client $ client = null ,
48+ ?Client $ workspaceClient = null
4849 ): array {
4950 if ($ backend ) {
5051 $ options ['backend ' ] = $ backend ;
5152 }
5253 if ($ client === null ) {
5354 $ client = $ this ->_client ;
5455 }
56+ if ($ workspaceClient === null ) {
57+ $ workspaceClient = $ this ->workspaceSapiClient ;
58+ }
5559
5660 $ oldWorkspaces = $ this ->listTestWorkspaces ($ client );
57- $ workspaces = new Workspaces ($ this -> workspaceSapiClient );
61+ $ workspaces = new Workspaces ($ workspaceClient );
5862
5963 $ oldWorkspace = $ oldWorkspaces ? reset ($ oldWorkspaces ) : null ;
6064 if (!$ oldWorkspace ) {
@@ -64,7 +68,7 @@ protected function initTestWorkspace(
6468 || $ oldWorkspace ['connection ' ]['backend ' ] === $ options ['backend ' ];
6569 if (!$ forceRecreate && $ couldReuseExistingWorkspace ) {
6670 $ result = $ workspaces ->resetWorkspacePassword ($ oldWorkspace ['id ' ]);
67- if ($ this ->getDefaultBackend ($ this -> workspaceSapiClient ) === self ::BACKEND_BIGQUERY ) {
71+ if ($ this ->getDefaultBackend ($ workspaceClient ) === self ::BACKEND_BIGQUERY ) {
6872 $ oldWorkspace ['connection ' ]['credentials ' ] = $ result ['credentials ' ];
6973 } else {
7074 $ oldWorkspace ['connection ' ]['password ' ] = $ result ['password ' ];
You can’t perform that action at this time.
0 commit comments