Skip to content

Commit 3855424

Browse files
committed
fix(tests): "rejected promise … CodeWhisperer Security Scan"
Problem: Unhandled promise rejection in "minimum" CI job: rejected promise not handled within 1 second: Error: command 'workbench.action.output.show.extension-output-amazonwebservices.aws-toolkit-vscode-#2-CodeWhisperer Security Scan Logs' not found stack trace: Error: command 'workbench.action.output.show.extension-output-amazonwebservices.aws-toolkit-vscode-#2-CodeWhisperer Security Scan Logs' not found at v._tryExecuteCommand (vscode-file://vscode-app/codebuild/output/src4277748317/src/github.com/aws/aws-toolkit-vscode/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3532) at v.executeCommand (vscode-file://vscode-app/codebuild/output/src4277748317/src/github.com/aws/aws-toolkit-vscode/.vscode-test/vscode-linux-x64-1.68.0/resources/app/out/vs/workbench/workbench.desktop.main.js:1706:3414) at processTicksAndRejections (node:internal/process/task_queues:96:5) command 'workbench.action.output.show.extension-output-amazonwebservices.aws-toolkit-vscode-#2-CodeWhisperer Security Scan Logs' not found: Error: command 'workbench.action.output.show.extension-output-amazonwebservices.aws-toolkit-vscode-#2-CodeWhisperer Security Scan Logs' not found Solution: Security Scan is not supported on the "minimum" version. Skip the test for older vscode version.
1 parent a726b12 commit 3855424

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/codewhisperer/commands/startSecurityScan.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import assert from 'assert'
77
import * as vscode from 'vscode'
88
import * as sinon from 'sinon'
99
import * as got from 'got'
10+
import * as semver from 'semver'
1011
import { DefaultCodeWhispererClient } from '../../../codewhisperer/client/codewhisperer'
1112
import * as startSecurityScan from '../../../codewhisperer/commands/startSecurityScan'
1213
import { SecurityPanelViewProvider } from '../../../codewhisperer/views/securityPanelViewProvider'
@@ -251,6 +252,9 @@ describe('startSecurityScan', function () {
251252
})
252253

253254
it('Should highlight files after scan is completed', async function () {
255+
if (semver.lt(vscode.version, '1.78.0')) {
256+
this.skip()
257+
}
254258
const commandSpy = sinon.spy(vscode.commands, 'executeCommand')
255259
sinon.stub(got, 'default').resolves({ statusCode: 200 })
256260
const testWindow = getTestWindow()

0 commit comments

Comments
 (0)