Stub feature flag API endpoint in tests
This commit is contained in:
parent
6d62c245ec
commit
254816c2d2
12 changed files with 84 additions and 97 deletions
4
lib/analyze-action-input.test.js
generated
4
lib/analyze-action-input.test.js
generated
|
|
@ -45,8 +45,7 @@ const util = __importStar(require("./util"));
|
|||
.resolves({});
|
||||
sinon.stub(actionsUtil, "sendStatusReport").resolves(true);
|
||||
sinon.stub(configUtils, "getConfig").resolves({
|
||||
// Use GHES so we don't try to call the feature flags API endpoint
|
||||
gitHubVersion: { type: util.GitHubVariant.GHES, version: "3.0.0" },
|
||||
gitHubVersion: { type: util.GitHubVariant.DOTCOM },
|
||||
languages: [],
|
||||
});
|
||||
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
|
||||
|
|
@ -55,6 +54,7 @@ const util = __importStar(require("./util"));
|
|||
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
|
||||
optionalInputStub.withArgs("cleanup-level").returns("none");
|
||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, {});
|
||||
process.env["CODEQL_THREADS"] = "1";
|
||||
process.env["CODEQL_RAM"] = "4992";
|
||||
// Action inputs have precedence over environment variables.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue