mirror of
https://github.com/github/codeql-action.git
synced 2026-05-21 08:20:06 +00:00
Stub RUNNER_NAME in unit tests
This commit is contained in:
@@ -144,6 +144,8 @@ test.serial("load empty config", async (t) => {
|
||||
const logger = getRunnerLogger(true);
|
||||
const languages = "javascript,python";
|
||||
|
||||
setupActionsVars(tempDir, tempDir);
|
||||
|
||||
const codeql = createStubCodeQL({
|
||||
async betterResolveLanguages() {
|
||||
return {
|
||||
@@ -185,6 +187,8 @@ test.serial("load code quality config", async (t) => {
|
||||
const logger = getRunnerLogger(true);
|
||||
const languages = "actions";
|
||||
|
||||
setupActionsVars(tempDir, tempDir);
|
||||
|
||||
const codeql = createStubCodeQL({
|
||||
async betterResolveLanguages() {
|
||||
return {
|
||||
@@ -237,6 +241,8 @@ test.serial(
|
||||
const logger = getRunnerLogger(true);
|
||||
const languages = "javascript";
|
||||
|
||||
setupActionsVars(tempDir, tempDir);
|
||||
|
||||
const codeql = createStubCodeQL({
|
||||
async betterResolveLanguages() {
|
||||
return {
|
||||
@@ -475,6 +481,8 @@ test.serial("load non-existent input", async (t) => {
|
||||
|
||||
test.serial("load non-empty input", async (t) => {
|
||||
return await withTmpDir(async (tempDir) => {
|
||||
setupActionsVars(tempDir, tempDir);
|
||||
|
||||
const codeql = createStubCodeQL({
|
||||
async betterResolveLanguages() {
|
||||
return {
|
||||
|
||||
@@ -156,6 +156,7 @@ export const DEFAULT_ACTIONS_VARS = {
|
||||
GITHUB_SERVER_URL: "https://github.com",
|
||||
GITHUB_SHA: "0".repeat(40),
|
||||
GITHUB_WORKFLOW: "test-workflow",
|
||||
RUNNER_NAME: "my-runner",
|
||||
RUNNER_OS: "Linux",
|
||||
} as const satisfies Record<string, string>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user