Skip to content

Commit 29ea9d6

Browse files
committed
revert startSecurityScan.test.ts
1 parent d2d5d19 commit 29ea9d6

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
{
1313
"path": "packages/amazonq",
1414
},
15+
{
16+
"path": "../language-servers",
17+
},
18+
{
19+
"path": "../language-server-runtimes",
20+
},
1521
],
1622
"settings": {
1723
"typescript.tsdk": "node_modules/typescript/lib",

packages/amazonq/.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1414
"env": {
1515
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
16-
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
16+
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080",
1717
// Below allows for overrides used during development
18-
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19-
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
18+
"__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19+
"__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
2020
},
2121
"envFile": "${workspaceFolder}/.local.env",
2222
"outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],

packages/core/src/test/codewhisperer/startSecurityScan.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as diagnosticsProvider from '../../codewhisperer/service/diagnosticsPro
1414
import { getTestWorkspaceFolder } from '../../testInteg/integrationTestsUtilities'
1515
import { join } from 'path'
1616
import { assertTelemetry, closeAllEditors, getFetchStubWithResponse } from '../testUtil'
17-
import { ServiceException } from '@smithy/smithy-client'
17+
import { AWSError } from 'aws-sdk'
1818
import { getTestWindow } from '../shared/vscode/window'
1919
import { SeverityLevel } from '../shared/vscode/message'
2020
import { cancel } from '../../shared/localizedText'
@@ -334,11 +334,11 @@ describe('startSecurityScan', function () {
334334
getFetchStubWithResponse({ status: 200, statusText: 'testing stub' })
335335
const mockClient = createClient()
336336
mockClient.createCodeScan.throws({
337-
name: 'ThrottlingException',
337+
code: 'ThrottlingException',
338+
time: new Date(),
339+
name: 'error name',
338340
message: scansLimitReachedErrorMessage,
339-
$fault: 'client',
340-
$metadata: {},
341-
} satisfies ServiceException)
341+
} satisfies AWSError)
342342
sinon.stub(errors, 'isAwsError').returns(true)
343343
const testWindow = getTestWindow()
344344
await startSecurityScan.startSecurityScan(
@@ -365,11 +365,11 @@ describe('startSecurityScan', function () {
365365
await model.CodeScansState.instance.setScansEnabled(true)
366366
const mockClient = createClient()
367367
mockClient.createCodeScan.throws({
368-
name: 'ThrottlingException',
368+
code: 'ThrottlingException',
369+
time: new Date(),
370+
name: 'error name',
369371
message: 'Maximum file scans count reached for this month',
370-
$fault: 'client',
371-
$metadata: {},
372-
} satisfies ServiceException)
372+
} satisfies AWSError)
373373
sinon.stub(errors, 'isAwsError').returns(true)
374374
assert.equal(model.CodeScansState.instance.isMonthlyQuotaExceeded(), false)
375375
await startSecurityScan.startSecurityScan(

0 commit comments

Comments
 (0)