integration support for harness p5-fixed lint
Signed-off-by: Calvin Lee <cjlee@ualberta.ca>
This commit is contained in:
Vendored
+2
-8
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user