mirror of
https://github.com/github/codeql-action.git
synced 2026-11-08 14:09:51 +00:00
Remove getRunnerLogger
This commit is contained in:
@@ -12,7 +12,7 @@ import { setUpFeatureFlagTests } from "./feature-flags/testing-util";
|
||||
import { UnvalidatedObject, validateSchema } from "./json";
|
||||
import { makeFromSchema } from "./json/testing-util";
|
||||
import { BuiltInLanguage } from "./languages";
|
||||
import { getRunnerLogger, Logger } from "./logging";
|
||||
import { Logger } from "./logging";
|
||||
import { BundlePlatform, getBundlePlatform } from "./platform";
|
||||
import * as startProxyExports from "./start-proxy";
|
||||
import * as statusReport from "./status-report";
|
||||
@@ -148,7 +148,7 @@ test("getCredentials prefers registriesCredentials over registrySecrets", async
|
||||
]);
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
registrySecrets,
|
||||
registryCredentials,
|
||||
undefined,
|
||||
@@ -165,7 +165,7 @@ test("getCredentials throws an error when configurations are not an array", asyn
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
registryCredentials,
|
||||
undefined,
|
||||
@@ -184,7 +184,7 @@ test("getCredentials throws error when credential is not an object", async (t) =
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
testCredential,
|
||||
undefined,
|
||||
@@ -205,7 +205,7 @@ test("getCredentials throws error when credential is missing type", async (t) =>
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
testCredential,
|
||||
undefined,
|
||||
@@ -228,7 +228,7 @@ test("getCredentials throws error when credential missing host and url", async (
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
testCredential,
|
||||
undefined,
|
||||
@@ -242,7 +242,7 @@ test("getCredentials throws error when credential missing host and url", async (
|
||||
|
||||
test("getCredentials filters by language when specified", async (t) => {
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON(mixedCredentials),
|
||||
BuiltInLanguage.java,
|
||||
@@ -253,7 +253,7 @@ test("getCredentials filters by language when specified", async (t) => {
|
||||
|
||||
test("getCredentials returns all for a language when specified", async (t) => {
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON([...mixedCredentials, gitSourceCredential]),
|
||||
BuiltInLanguage.go,
|
||||
@@ -273,7 +273,7 @@ test("getCredentials returns all goproxy_servers for Go when specified", async (
|
||||
];
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON(multipleGoproxyServers),
|
||||
BuiltInLanguage.go,
|
||||
@@ -302,7 +302,7 @@ test("getCredentials returns all maven_repositories for Java when specified", as
|
||||
];
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON(multipleMavenRepositories),
|
||||
BuiltInLanguage.java,
|
||||
@@ -320,7 +320,7 @@ test("getCredentials returns all credentials when no language specified", async
|
||||
const credentialsInput = toEncodedJSON(mixedCredentials);
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
undefined,
|
||||
@@ -350,7 +350,7 @@ test("getCredentials throws an error when non-printable characters are used", as
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
undefined,
|
||||
@@ -381,7 +381,7 @@ for (const oidcSchemaInfo of startProxyExports.oidcSchemas) {
|
||||
t.throws(
|
||||
() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
undefined,
|
||||
@@ -405,7 +405,7 @@ test("getCredentials accepts OIDC configurations", (t) => {
|
||||
);
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON(oidcConfigurations),
|
||||
BuiltInLanguage.csharp,
|
||||
@@ -595,7 +595,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
|
||||
]);
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
BuiltInLanguage.java,
|
||||
@@ -614,7 +614,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
|
||||
};
|
||||
t.throws(() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON([{ ...baseInvalid, "replaces-base": null }]),
|
||||
BuiltInLanguage.java,
|
||||
@@ -622,7 +622,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
|
||||
);
|
||||
t.throws(() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON([{ ...baseInvalid, "replaces-base": 123 }]),
|
||||
BuiltInLanguage.java,
|
||||
@@ -630,7 +630,7 @@ test("getCredentials validates 'replaces-base' correctly", async (t) => {
|
||||
);
|
||||
t.throws(() =>
|
||||
startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
toEncodedJSON([{ ...baseInvalid, "replaces-base": "true" }]),
|
||||
BuiltInLanguage.java,
|
||||
@@ -646,7 +646,7 @@ test("getCredentials returns only ALWAYS_ENABLED_REGISTRY_TYPE credentials for A
|
||||
]);
|
||||
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
BuiltInLanguage.actions,
|
||||
@@ -678,7 +678,7 @@ test("getCredentials always returns ALWAYS_ENABLED_REGISTRY_TYPE credentials for
|
||||
// Test all languages.
|
||||
for (const language of Object.values(BuiltInLanguage)) {
|
||||
const credentials = startProxyExports.getCredentials(
|
||||
getRunnerLogger(true),
|
||||
new RecordingLogger(),
|
||||
undefined,
|
||||
credentialsInput,
|
||||
language,
|
||||
|
||||
Reference in New Issue
Block a user