From 329c022f486ae3deced8c256a11365c7a7799041 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 24 Mar 2023 21:50:26 +0000 Subject: [PATCH] Just check the number of locations Only tests the property we are looking for and avoids problems with different cross-platform behavior. --- .github/workflows/__diagnostics-export.yml | 4 ---- pr-checks/checks/diagnostics-export.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 41be3493ce..eac8e6494b 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -95,10 +95,6 @@ jobs: if (n.locations.length !== 1) { core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`); } - const actualUri = n.locations[0].physicalLocation?.artifactLocation?.uri - if (actualUri !== '/path/to/file') { - core.setFailed(`Expected the status page diagnostic to have a location with the URI '/path/to/file', but found '${actualUri}'.`); - } } const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8')); diff --git a/pr-checks/checks/diagnostics-export.yml b/pr-checks/checks/diagnostics-export.yml index bd9e339d43..03f87c68c7 100644 --- a/pr-checks/checks/diagnostics-export.yml +++ b/pr-checks/checks/diagnostics-export.yml @@ -51,10 +51,6 @@ steps: if (n.locations.length !== 1) { core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`); } - const actualUri = n.locations[0].physicalLocation?.artifactLocation?.uri - if (actualUri !== '/path/to/file') { - core.setFailed(`Expected the status page diagnostic to have a location with the URI '/path/to/file', but found '${actualUri}'.`); - } } const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));