Skip to content

Commit ace076b

Browse files
authored
Merge pull request #1070 from github/mergeback/v2.1.10-to-main-2f58583a
Mergeback v2.1.10 refs/heads/releases/v2 into main
2 parents c4fdf5f + 97847a4 commit ace076b

6 files changed

+30
-14
lines changed

lib/analyze-action-env.test.js

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

lib/analyze-action-env.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-input.test.js

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

lib/analyze-action-input.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action-env.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ setupTests(test);
2222

2323
test("analyze action with RAM & threads from environment variables", async (t) => {
2424
await util.withTmpDir(async (tmpDir) => {
25-
process.env["GITHUB_SERVER_URL"] = "fake-server-url";
26-
process.env["GITHUB_REPOSITORY"] = "fake/repository";
25+
process.env["GITHUB_SERVER_URL"] = util.GITHUB_DOTCOM_URL;
26+
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
2727
sinon
2828
.stub(actionsUtil, "createStatusReportBase")
2929
.resolves({} as actionsUtil.StatusReportBase);
3030
sinon.stub(actionsUtil, "sendStatusReport").resolves(true);
31+
const gitHubVersion: util.GitHubVersion = {
32+
type: util.GitHubVariant.DOTCOM,
33+
};
3134
sinon.stub(configUtils, "getConfig").resolves({
32-
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
35+
gitHubVersion,
3336
languages: [],
3437
packs: [],
3538
} as unknown as configUtils.Config);
@@ -38,6 +41,7 @@ test("analyze action with RAM & threads from environment variables", async (t) =
3841
requiredInputStub.withArgs("upload-database").returns("false");
3942
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
4043
optionalInputStub.withArgs("cleanup-level").returns("none");
44+
sinon.stub(util, "getGitHubVersion").resolves(gitHubVersion);
4145
setupActionsVars(tmpDir, tmpDir);
4246
mockFeatureFlagApiEndpoint(200, {});
4347

src/analyze-action-input.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ setupTests(test);
2222

2323
test("analyze action with RAM & threads from action inputs", async (t) => {
2424
await util.withTmpDir(async (tmpDir) => {
25-
process.env["GITHUB_SERVER_URL"] = "fake-server-url";
26-
process.env["GITHUB_REPOSITORY"] = "fake/repository";
25+
process.env["GITHUB_SERVER_URL"] = util.GITHUB_DOTCOM_URL;
26+
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
2727
sinon
2828
.stub(actionsUtil, "createStatusReportBase")
2929
.resolves({} as actionsUtil.StatusReportBase);
3030
sinon.stub(actionsUtil, "sendStatusReport").resolves(true);
31+
const gitHubVersion: util.GitHubVersion = {
32+
type: util.GitHubVariant.DOTCOM,
33+
};
3134
sinon.stub(configUtils, "getConfig").resolves({
32-
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
35+
gitHubVersion,
3336
languages: [],
3437
packs: [],
3538
} as unknown as configUtils.Config);
@@ -38,6 +41,7 @@ test("analyze action with RAM & threads from action inputs", async (t) => {
3841
requiredInputStub.withArgs("upload-database").returns("false");
3942
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
4043
optionalInputStub.withArgs("cleanup-level").returns("none");
44+
sinon.stub(util, "getGitHubVersion").resolves(gitHubVersion);
4145
setupActionsVars(tmpDir, tmpDir);
4246
mockFeatureFlagApiEndpoint(200, {});
4347

0 commit comments

Comments
 (0)