Refactoring: Rename KnownLanguage to BuiltInLanguage

This commit is contained in:
Henry Mercer
2026-04-10 17:42:39 +01:00
parent bad0a744dd
commit e6c21da23c
38 changed files with 319 additions and 304 deletions
+8 -8
View File
@@ -8,7 +8,7 @@ import sinon from "sinon";
import * as apiClient from "./api-client";
import * as defaults from "./defaults.json";
import { setUpFeatureFlagTests } from "./feature-flags/testing-util";
import { KnownLanguage } from "./languages";
import { BuiltInLanguage } from "./languages";
import { getRunnerLogger, Logger } from "./logging";
import * as startProxyExports from "./start-proxy";
import * as statusReport from "./status-report";
@@ -231,7 +231,7 @@ test("getCredentials filters by language when specified", async (t) => {
getRunnerLogger(true),
undefined,
toEncodedJSON(mixedCredentials),
KnownLanguage.java,
BuiltInLanguage.java,
);
t.is(credentials.length, 1);
t.is(credentials[0].type, "maven_repository");
@@ -242,7 +242,7 @@ test("getCredentials returns all for a language when specified", async (t) => {
getRunnerLogger(true),
undefined,
toEncodedJSON(mixedCredentials),
KnownLanguage.go,
BuiltInLanguage.go,
);
t.is(credentials.length, 2);
@@ -262,7 +262,7 @@ test("getCredentials returns all goproxy_servers for Go when specified", async (
getRunnerLogger(true),
undefined,
toEncodedJSON(multipleGoproxyServers),
KnownLanguage.go,
BuiltInLanguage.go,
);
t.is(credentials.length, 3);
@@ -291,7 +291,7 @@ test("getCredentials returns all maven_repositories for Java when specified", as
getRunnerLogger(true),
undefined,
toEncodedJSON(multipleMavenRepositories),
KnownLanguage.java,
BuiltInLanguage.java,
);
t.is(credentials.length, 2);
@@ -479,7 +479,7 @@ test("getCredentials accepts OIDC configurations", (t) => {
getRunnerLogger(true),
undefined,
toEncodedJSON(oidcConfigurations),
KnownLanguage.csharp,
BuiltInLanguage.csharp,
);
t.is(credentials.length, 3);
@@ -646,7 +646,7 @@ test("getCredentials returns all credentials for Actions when using LANGUAGE_TO_
getRunnerLogger(true),
undefined,
credentialsInput,
KnownLanguage.actions,
BuiltInLanguage.actions,
false,
);
t.is(credentials.length, mixedCredentials.length);
@@ -659,7 +659,7 @@ test("getCredentials returns no credentials for Actions when using NEW_LANGUAGE_
getRunnerLogger(true),
undefined,
credentialsInput,
KnownLanguage.actions,
BuiltInLanguage.actions,
true,
);
t.deepEqual(credentials, []);