Restore original getCodeQLActionRepository behaviour

This commit is contained in:
Simon Engledew 2021-06-24 17:51:49 +01:00
parent ac402bf222
commit 9200db3ec4
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
7 changed files with 15 additions and 13 deletions

7
lib/codeql.test.js generated
View file

@ -192,17 +192,18 @@ ava_1.default("getExtraOptions throws for bad content", (t) => {
});
ava_1.default("getCodeQLActionRepository", (t) => {
const logger = logging_1.getRunnerLogger(true);
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
util_1.initializeEnvironment(util_1.Mode.actions, "1.2.3");
const repoActions = codeql.getCodeQLActionRepository(logger);
t.deepEqual(repoActions, "github/codeql-action");
process.env["GITHUB_ACTION_REPOSITORY"] = "xxx/yyy";
const repoEnv = codeql.getCodeQLActionRepository(logger);
t.deepEqual(repoEnv, "xxx/yyy");
util_1.initializeEnvironment(util_1.Mode.runner, "1.2.3");
// isRunningLocalAction() === true
delete process.env["GITHUB_ACTION_REPOSITORY"];
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
const repoLocalRunner = codeql.getCodeQLActionRepository(logger);
t.deepEqual(repoLocalRunner, "github/codeql-action");
process.env["GITHUB_ACTION_REPOSITORY"] = "xxx/yyy";
const repoEnv = codeql.getCodeQLActionRepository(logger);
t.deepEqual(repoEnv, "xxx/yyy");
});
//# sourceMappingURL=codeql.test.js.map