Skip to content

Commit 763af23

Browse files
fixed test case issues
1 parent c72c93d commit 763af23

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/main/wrapper/CxWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ export class CxWrapper {
547547
return new ExecutionService().executeCommands(this.config.pathToExecutable, commands, CxConstants.MASK_TYPE);
548548
}
549549

550-
telemetryAIEvent(aiProvider: string, agent: string, eventType: string, subType: string, engine: string, problemSeverity: string, scanType: string, status: string, totalCount: number): Promise<CxCommandOutput> {
550+
telemetryAIEvent(aiProvider: string, eventType: string, subType: string, engine: string, problemSeverity: string, scanType: string, status: string, totalCount: number): Promise<CxCommandOutput> {
551551
const commands: string[] = [
552552
CxConstants.TELEMETRY,
553553
CxConstants.SUB_CMD_TELEMETRY_AI,

src/tests/BaseTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class BaseTest {
1717
this.clientSecret = process.env["CX_CLIENT_SECRET"];
1818
this.tenant = process.env["CX_TENANT"];
1919
this.apiKey = process.env["CX_APIKEY"];
20-
this.agentName = "--agent"
20+
this.agentName = "VS Code"
2121
this.additionalParameters = "--debug"
2222
if (process.env["PATH_TO_EXECUTABLE"] !== null && process.env["PATH_TO_EXECUTABLE"] !== undefined) {
2323
this.pathToExecutable = process.env["PATH_TO_EXECUTABLE"];

src/tests/TelemetryTest.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ describe("Telemetry cases", () => {
99
const wrapper = new CxWrapper(cxScanConfig);
1010
const cxCommandOutput: CxCommandOutput = await wrapper.telemetryAIEvent(
1111
"Cursor",
12-
"Cursos",
1312
"click",
1413
"ast-results.viewPackageDetails",
1514
"secrets",
@@ -30,7 +29,6 @@ describe("Telemetry cases", () => {
3029
"",
3130
"",
3231
"",
33-
"",
3432
"asca",
3533
"Critical",
3634
10
@@ -43,8 +41,7 @@ describe("Telemetry cases", () => {
4341
it('TelemetryAIEvent Successful case with edge case parameters', async () => {
4442
const wrapper = new CxWrapper(cxScanConfig);
4543
const cxCommandOutput: CxCommandOutput = await wrapper.telemetryAIEvent(
46-
"",
47-
"",
44+
"",
4845
"",
4946
"",
5047
"",

0 commit comments

Comments
 (0)