Skip to content

Commit

Permalink
chore: add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
panuhorsmalahti committed Jun 27, 2024
1 parent bc6ee81 commit c9c669d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration-test/configuration.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 11 additions & 2 deletions integration-test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { config } from "./configuration";

export class TestPlatform {
public fakeToken?: string;

public readonly client: LensPlatformClient;

constructor(private readonly accessToken: string) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c9c669d

Please sign in to comment.