Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
toolmantim committed Mar 18, 2024
1 parent 5a94b6e commit 382b0a4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion vscode/src/configuration.ts
Expand Up @@ -187,7 +187,7 @@ export const getFullConfig = async (): Promise<ConfigurationWithAccessToken> =>
const config = getConfiguration()
const isTesting = process.env.CODY_TESTING === 'true'
const serverEndpoint =
localStorage?.getEndpoint() || (isTesting ? 'http://localhost:49300/' : DOTCOM_URL.href)
localStorage?.getEndpoint() || (isTesting ? `http://localhost:4930${process.env.VITEST_POOL_ID || 0}/` : DOTCOM_URL.href)
const accessToken = (await getAccessToken()) || null
return { ...config, accessToken, serverEndpoint }
}
Expand Down
2 changes: 1 addition & 1 deletion vscode/test/e2e/helpers.ts
Expand Up @@ -258,7 +258,7 @@ async function buildWorkSpaceSettings(
extraSettings: WorkspaceSettings
): Promise<void> {
const settings = {
'cody.serverEndpoint': 'http://localhost:49300',
'cody.serverEndpoint': `http://localhost:4930${process.env.VITEST_POOL_ID || 0}`,
'cody.commandCodeLenses': true,
'cody.editorTitleCommandIcon': true,
...extraSettings,
Expand Down
1 change: 0 additions & 1 deletion vscode/test/fixtures/.vscode/settings.json
@@ -1,5 +1,4 @@
{
"cody.codebase": "http://localhost:49300",
"cody.debug.enable": true,
"cody.debug.verbose": true,
}
5 changes: 2 additions & 3 deletions vscode/test/fixtures/mock-server.ts
Expand Up @@ -18,9 +18,8 @@ interface MockRequest {
}
}

const SERVER_PORT = 49300

export const SERVER_URL = 'http://localhost:49300'
const SERVER_PORT = Number(`4930${process.env.VITEST_POOL_ID || 0}`)
export const SERVER_URL = `http://localhost:${SERVER_PORT}`
export const VALID_TOKEN = 'sgp_1234567890123456789012345678901234567890'

const responses = {
Expand Down
1 change: 0 additions & 1 deletion vscode/test/fixtures/multi-root.code-workspace
Expand Up @@ -10,7 +10,6 @@
"settings": {
// Settings that should also apply to the single-root workspace tests should also be
// included in fixtures\workspace\.vscode\settings.json!
"cody.serverEndpoint": "http://localhost:49300",
"cody.commandCodeLenses": true,
"cody.editorTitleCommandIcon": true,
"cody.experimental.symfContext": false,
Expand Down

0 comments on commit 382b0a4

Please sign in to comment.