Skip validating SARIF produced by CodeQL
This commit is contained in:
parent
f681ad69a7
commit
2f70a988e7
9 changed files with 97 additions and 63 deletions
|
|
@ -17,14 +17,22 @@ test.beforeEach(() => {
|
|||
test("validateSarifFileSchema - valid", (t) => {
|
||||
const inputFile = `${__dirname}/../src/testdata/valid-sarif.sarif`;
|
||||
t.notThrows(() =>
|
||||
uploadLib.validateSarifFileSchema(inputFile, getRunnerLogger(true)),
|
||||
uploadLib.validateSarifFileSchema(
|
||||
uploadLib.readSarifFile(inputFile),
|
||||
inputFile,
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("validateSarifFileSchema - invalid", (t) => {
|
||||
const inputFile = `${__dirname}/../src/testdata/invalid-sarif.sarif`;
|
||||
t.throws(() =>
|
||||
uploadLib.validateSarifFileSchema(inputFile, getRunnerLogger(true)),
|
||||
uploadLib.validateSarifFileSchema(
|
||||
uploadLib.readSarifFile(inputFile),
|
||||
inputFile,
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
@ -314,7 +322,11 @@ test("accept results with invalid artifactLocation.uri value", (t) => {
|
|||
} as Logger;
|
||||
|
||||
const sarifFile = `${__dirname}/../src/testdata/with-invalid-uri.sarif`;
|
||||
uploadLib.validateSarifFileSchema(sarifFile, mockLogger);
|
||||
uploadLib.validateSarifFileSchema(
|
||||
uploadLib.readSarifFile(sarifFile),
|
||||
sarifFile,
|
||||
mockLogger,
|
||||
);
|
||||
|
||||
t.deepEqual(loggedMessages.length, 3);
|
||||
t.deepEqual(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue