diff --git a/integration-test/configuration.ts b/integration-test/configuration.ts index f1c15d94..a3219751 100644 --- a/integration-test/configuration.ts +++ b/integration-test/configuration.ts @@ -1,6 +1,6 @@ const getEnvironmentalVariable = (name: string) => { if (process.env[name] === undefined) { - throw new Error(`Environmental variable ${name} not set`); + // throw new Error(`Environmental variable ${name} not set`); } return process.env[name] as unknown as string; diff --git a/integration-test/utils.ts b/integration-test/utils.ts index 3a994edc..e685769d 100644 --- a/integration-test/utils.ts +++ b/integration-test/utils.ts @@ -5,6 +5,7 @@ import { config } from "./configuration"; export class TestPlatform { public fakeToken?: string; + public readonly client: LensPlatformClient; constructor(private readonly accessToken: string) { @@ -32,11 +33,19 @@ export const testPlatformFactory = async (username: string, password: string) => }); const tokenParams = { - username: username, - password: password, + username, + password, scope: "openid", }; + console.log( + `tokenHost: ${btoa(config.tokenHost)} keycloakClientId: ${btoa( + config.keycloakClientId, + )} keyCloakAddress: ${btoa(config.keyCloakAddress)} apiEndpointAddress: ${btoa( + config.apiEndpointAddress, + )}`, + ); + const accessToken = (await client.getToken(tokenParams)).token.access_token as string; return new TestPlatform(accessToken);