Skip to content

Commit 91f3460

Browse files
committed
Throw if in test mode
1 parent edebb78 commit 91f3460

9 files changed

+63
-0
lines changed

lib/analyze-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/status-report.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,17 @@ export async function sendUnhandledErrorStatusReport(
630630
);
631631
if (statusReport !== undefined) {
632632
await sendStatusReport(statusReport);
633+
} else if (isInTestMode()) {
634+
throw new Error(
635+
"Failed to create status report for unhandled error in test mode.",
636+
);
633637
}
634638
} catch (e) {
635639
logger.warning(
636640
`Failed to send the error status report: ${getErrorMessage(e)}.`,
637641
);
642+
if (isInTestMode()) {
643+
throw e;
644+
}
638645
}
639646
}

0 commit comments

Comments
 (0)