Skip to content

Commit 2dd6ee5

Browse files
committed
Fix tests
1 parent f993f99 commit 2dd6ee5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/analyze-action-env.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ test("analyze action with RAM & threads from environment variables", async (t) =
4747
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
4848
requiredInputStub.withArgs("token").returns("fake-token");
4949
requiredInputStub.withArgs("upload-database").returns("false");
50+
requiredInputStub.withArgs("output").returns("out");
5051
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
5152
optionalInputStub.withArgs("cleanup-level").returns("none");
5253
optionalInputStub.withArgs("expect-error").returns("false");

src/analyze-action-input.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ test("analyze action with RAM & threads from action inputs", async (t) => {
4545
const requiredInputStub = sinon.stub(actionsUtil, "getRequiredInput");
4646
requiredInputStub.withArgs("token").returns("fake-token");
4747
requiredInputStub.withArgs("upload-database").returns("false");
48+
requiredInputStub.withArgs("output").returns("out");
4849
const optionalInputStub = sinon.stub(actionsUtil, "getOptionalInput");
4950
optionalInputStub.withArgs("cleanup-level").returns("none");
5051
optionalInputStub.withArgs("expect-error").returns("false");

src/upload-lib.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as jsonschema from "jsonschema";
99
import * as semver from "semver";
1010

1111
import * as actionsUtil from "./actions-util";
12-
import { getOptionalInput, getRequiredInput } from "./actions-util";
1312
import * as api from "./api-client";
1413
import { getGitHubVersion, wrapApiConfigurationError } from "./api-client";
1514
import { CodeQL, getCodeQL } from "./codeql";
@@ -259,8 +258,8 @@ async function combineSarifFilesUsingCLI(
259258
);
260259

261260
const apiDetails = {
262-
auth: getRequiredInput("token"),
263-
externalRepoAuth: getOptionalInput("external-repository-token"),
261+
auth: actionsUtil.getRequiredInput("token"),
262+
externalRepoAuth: actionsUtil.getOptionalInput("external-repository-token"),
264263
url: getRequiredEnvParam("GITHUB_SERVER_URL"),
265264
apiURL: getRequiredEnvParam("GITHUB_API_URL"),
266265
};

0 commit comments

Comments
 (0)