integration support for harness p5-fixed lint

Signed-off-by: Calvin Lee <cjlee@ualberta.ca>
This commit is contained in:
Calvin Lee
2024-04-23 21:13:04 -06:00
parent 0cf356671a
commit 1cfa4aa35e
5 changed files with 7 additions and 20 deletions
+2 -8
View File
@@ -353,16 +353,10 @@ export interface Config {
*/
host: string;
/**
* The base url for the Gitea instance.
* @visibility frontend
*/
baseUrl?: string;
/**
* The username to use for authenticated requests.
* The apikey to use for authenticated requests.
* @visibility secret
*/
username?: string;
apiKey?: string;
/**
* Harness Code token used to authenticate requests. This can be either a generated access token.
* @visibility secret
@@ -81,9 +81,6 @@ describe('readHarnessConfig', () => {
expect(() => readHarnessConfig(buildConfig({ ...valid, host: 2 }))).toThrow(
/host/,
);
expect(() =>
readHarnessConfig(buildConfig({ ...valid, baseUrl: 2 })),
).toThrow(/baseUrl/);
});
it('works on the frontend', async () => {
@@ -44,7 +44,6 @@ export type HarnessIntegrationConfig = {
*/
export function readHarnessConfig(config: Config): HarnessIntegrationConfig {
const host = config.getString('host');
let baseUrl = config.getOptionalString('baseUrl');
const token = config.getOptionalString('token');
const apiKey = config.getOptionalString('apiKey');
@@ -54,8 +53,6 @@ export function readHarnessConfig(config: Config): HarnessIntegrationConfig {
);
}
baseUrl = `https://${host}`;
return {
host,
apiKey,