@@ -45,7 +45,7 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r
4545 if ( test . uri . scheme === "file" ) {
4646 // Client-side editing, for which we will assume objectscript.conn names a server defined in `intersystems.servers`
4747 const conn : any = vscode . workspace . getConfiguration ( "objectscript" , test . uri ) . get ( "conn" ) ;
48- authority = conn . server + ":" + ( conn . ns as string ) . toLowerCase ( ) ;
48+ authority = ( conn . server || "" ) + ":" + ( conn . ns as string ) . toLowerCase ( ) ;
4949 const folder = vscode . workspace . getWorkspaceFolder ( test . uri ) ;
5050 if ( folder ) {
5151 key = key . slice ( folder . uri . path . length + relativeTestRoot ( folder ) . length + 1 ) ;
@@ -89,7 +89,8 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r
8989 'Test Results' ,
9090 true
9191 ) ;
92- const authority = mapInstance [ 0 ] ;
92+ let authority = mapInstance [ 0 ] ;
93+ let query = "" ;
9394 const mapTestClasses = mapInstance [ 1 ] ;
9495 const firstClassTestItem = Array . from ( mapTestClasses . values ( ) ) [ 0 ] ;
9596 const oneUri = firstClassTestItem . uri ;
@@ -126,7 +127,14 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r
126127 }
127128
128129 const username : string = server . username || 'UnknownUser' ;
129- const testRoot = vscode . Uri . from ( { scheme : 'isfs' , authority, path : `/.vscode/UnitTestRoot/${ username } ` } ) ;
130+
131+ // When client-side mode is using 'objectscript.conn.docker-compose the first piece of 'authority' is blank,
132+ if ( authority . startsWith ( ":" ) ) {
133+ const namespace = authority . slice ( 1 ) . toUpperCase ( ) ;
134+ query = `ns=${ encodeURIComponent ( namespace ) } ` ;
135+ authority = folder ?. name || "" ;
136+ }
137+ const testRoot = vscode . Uri . from ( { scheme : 'isfs' , authority, path : `/.vscode/UnitTestRoot/${ username } ` , query } ) ;
130138 try {
131139 // Limitation of the Atelier API means this can only delete the files, not the folders
132140 // but zombie folders shouldn't cause problems.
0 commit comments