Skip to content

Commit

Permalink
fix: properly setup for jwt test
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Aug 7, 2023
1 parent 3710a88 commit c65182f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/commands/0-scratch-identify.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import * as path from 'path';
import { expect } from 'chai';

import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { execCmd, TestSession, prepareForJwt } from '@salesforce/cli-plugins-testkit';
import { Env } from '@salesforce/kit';
import { ensureString } from '@salesforce/ts-types';
import { AuthFields, AuthInfo } from '@salesforce/core';
Expand All @@ -23,13 +23,12 @@ describe('verify discovery/id of scratch org', () => {

before('prepare session and ensure environment variables', async () => {
const env = new Env();
// ensureString(env.getString('TESTKIT_JWT_KEY'));
// ensureString(env.getString('TESTKIT_JWT_CLIENT_ID'));
// ensureString(env.getString('TESTKIT_HUB_INSTANCE'));
// hubUsername = ensureString(env.getString('TESTKIT_HUB_USERNAME'));
hubUsername = ensureString(env.getString('TESTKIT_AUTH_URL'));
ensureString(env.getString('TESTKIT_JWT_KEY'));
ensureString(env.getString('TESTKIT_JWT_CLIENT_ID'));
ensureString(env.getString('TESTKIT_HUB_INSTANCE'));
hubUsername = ensureString(env.getString('TESTKIT_HUB_USERNAME'));
testSession = await TestSession.create({
devhubAuthStrategy: 'AUTH_URL',
devhubAuthStrategy: 'AUTO',
project: { name: 'ScratchIDProject' },
scratchOrgs: [
{
Expand All @@ -46,7 +45,7 @@ describe('verify discovery/id of scratch org', () => {
);

// we'll need this path for testing
jwtKey = path.join(testSession.homeDir, 'jwtKey');
jwtKey = prepareForJwt(testSession.homeDir);
});

after(async () => {
Expand Down

0 comments on commit c65182f

Please sign in to comment.