Skip to content

Commit 8dae6d5

Browse files
Itay PazItay Paz
authored andcommitted
add ignore secrets test
1 parent a7f7a22 commit 8dae6d5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/tests/ScanTest.test.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe("ScanCreate cases", () => {
183183
expect(cxCommandOutput.exitCode).toBe(0);
184184
});
185185

186-
skip.it('ScanOss with ignored package should filter results', async () => {
186+
it.skip('ScanOss with ignored package should filter results', async () => {
187187
const wrapper = new CxWrapper(cxScanConfig);
188188
const sourceFile = "tsc/tests/data/package.json";
189189
const ignoredFile = "tsc/tests/data/checkmarxIgnoredTempFile.json";
@@ -213,4 +213,19 @@ describe("ScanCreate cases", () => {
213213
expect(cxCommandOutput.exitCode).toBe(0);
214214
});
215215

216+
it.skip('ScanSecrets with ignore file filters the result', async () => {
217+
const wrapper = new CxWrapper(cxScanConfig);
218+
const cxCommandOutput: CxCommandOutput = await wrapper.secretsScanResults(
219+
"src/tests/data/secret-exposed.txt",
220+
"src/tests/data/ignoreFileSecrets.json"
221+
);
222+
223+
console.log("Json object from scanSecrets with ignore file: " + JSON.stringify(cxCommandOutput));
224+
expect(cxCommandOutput.payload).toBeDefined();
225+
expect(Array.isArray(cxCommandOutput.payload)).toBe(true);
226+
expect(cxCommandOutput.payload.length).toBe(0);
227+
expect(cxCommandOutput.exitCode).toBe(0);
228+
});
229+
216230
});
231+

0 commit comments

Comments
 (0)