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

View file

@ -374,10 +374,16 @@ test("getExtraOptions throws for bad content", (t) => {
test("getCodeQLActionRepository", (t) => {
const logger = getRunnerLogger(true);
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
initializeEnvironment(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");
initializeEnvironment(Mode.runner, "1.2.3");
// isRunningLocalAction() === true
@ -385,8 +391,4 @@ test("getCodeQLActionRepository", (t) => {
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");
});