Skip to content

Commit 46703d7

Browse files
Update PredicateTest.test.ts
1 parent 562b5ce commit 46703d7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/tests/PredicateTest.test.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ describe("Triage cases", () => {
6767
};
6868

6969
it('SCA Triage Show and Update Successful case', async () => {
70-
const projectId = "d4d7f382-8dee-48c7-ac8f-67fab2c313a8";
71-
const vulnerabilities = "packagename=Maven-org.apache.tomcat.embed:tomcat-embed-core,packageversion=9.0.14,vulnerabilityId=CVE-2024-56337,packagemanager=maven";
70+
const projectId = "3c6569c8-020f-43c0-b7d5-b0543cceaa25";
71+
const vulnerabilities = "packagename=Npm-tar-fs,packageversion=2.1.1,vulnerabilityId=CVE-2024-12905,packagemanager=npm";
7272
const scanType = "sca";
7373
const state = "To_verify";
7474
const comment = "comment1";
75-
await handleTriageSCAShow(projectId, vulnerabilities, scanType);
75+
// Update first: the show endpoint returns 404 until a triage record exists for the finding
7676
await handleTriageSCAUpdate(projectId, vulnerabilities, scanType, state, comment);
77+
await handleTriageSCAShow(projectId, vulnerabilities, scanType);
7778
});
7879

7980
it('SCA Triage Show and Update Failure case', async () => {
@@ -91,7 +92,7 @@ describe("Triage cases", () => {
9192
});
9293

9394
it('SCA Triage Show and Update with empty vulnerabilities', async () => {
94-
const projectId = "d4d7f382-8dee-48c7-ac8f-67fab2c313a8";
95+
const projectId = "3c6569c8-020f-43c0-b7d5-b0543cceaa25";
9596
const vulnerabilities = "";
9697
const scanType = "sca";
9798
const state = "To_verify";

0 commit comments

Comments
 (0)