Skip to content

Commit ccc586a

Browse files
committed
testing purpose
1 parent cee61d3 commit ccc586a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

packages/amazonq/src/lsp/activation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { AmazonQLspInstaller, getBundledResourcePaths } from './lspInstaller'
99
import { lspSetupStage, ToolkitError, messages, getLogger } from 'aws-core-vscode/shared'
1010

1111
export async function activate(ctx: vscode.ExtensionContext) {
12+
getLogger('amazonqLsp').debug('Amazon Q LSP extension activated')
1213
try {
1314
await lspSetupStage('all', async () => {
1415
const installResult = await new AmazonQLspInstaller().resolve()

packages/amazonq/src/lsp/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,15 @@ export async function startLanguageServer(
191191
* Because of this we initialize our Auth client **immediately** after the language server is ready.
192192
* Doing this removes the chance of something else attempting to use the Auth client before it is ready.
193193
*/
194+
getLogger().info(`inside startLanguageServer`)
194195
await initializeAuth(client)
195196

196197
await postStartLanguageServer(extensionContext, client, resourcePaths, toDispose)
197198

198199
return client
199200

200201
async function initializeAuth(client: LanguageClient) {
202+
getLogger().info(`reached initializeAuth`)
201203
AuthUtil.create(new auth2.LanguageClientAuth(client, clientId, encryptionKey))
202204

203205
// Migrate SSO connections from old Auth to the LSP identity server

packages/amazonq/test/unit/codewhisperer/util/authUtil.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ describe('AuthUtil', async function () {
367367
auth.session = new auth2.SsoLogin(auth.profileName, auth.lspAuth, auth.eventEmitter)
368368
}
369369

370-
const updateProfileStub = sinon.stub((auth as any).session, 'updateProfile').resolves()
370+
const updateProfileStubNew = sinon.stub((auth as any).session, 'updateProfile').resolves()
371371

372372
await auth.migrateSsoConnectionToLsp('test-client')
373373

374-
assert.ok(updateProfileStub.calledOnce)
374+
assert.ok(updateProfileStubNew.calledOnce)
375375
assert.ok(memento.update.calledWith('auth.profiles', undefined))
376-
assert.deepStrictEqual(updateProfileStub.firstCall.args[0], {
376+
assert.deepStrictEqual(updateProfileStubNew.firstCall.args[0], {
377377
startUrl: validProfile.startUrl,
378378
region: validProfile.ssoRegion,
379379
scopes: validProfile.scopes,
@@ -396,12 +396,12 @@ describe('AuthUtil', async function () {
396396
auth.session = new auth2.SsoLogin(auth.profileName, auth.lspAuth, auth.eventEmitter)
397397
}
398398

399-
const updateProfileStub = sinon.stub((auth as any).session, 'updateProfile').resolves()
399+
const updateProfileStubNext = sinon.stub((auth as any).session, 'updateProfile').resolves()
400400

401401
await auth.migrateSsoConnectionToLsp('test-client')
402402

403403
assert.ok(
404-
updateProfileStub.calledWith({
404+
updateProfileStubNext.calledWith({
405405
startUrl: validProfile.startUrl,
406406
region: validProfile.ssoRegion,
407407
scopes: validProfile.scopes,

0 commit comments

Comments
 (0)