Skip to content

Commit 24408c6

Browse files
committed
Fix tests.
1 parent ea862fa commit 24408c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/config_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ describe('KubeConfig', () => {
654654
it('should exec with exec auth and env vars', () => {
655655
const config = new KubeConfig();
656656
const token = 'token';
657-
const responseStr = `'{ "token": "${token}" }'`;
657+
const responseStr = `'{"status": { "token": "${token}" }}'`;
658658
config.loadFromClusterAndUser(
659659
{ skipTLSVerify: false } as Cluster,
660660
{

src/exec_auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ExecAuth implements Authenticator {
4141
const result = shell.exec(cmd, opts);
4242
if (result.code === 0) {
4343
const obj = JSON.parse(result.stdout);
44-
this.tokenCache[user.name] = obj.status.token;
44+
this.tokenCache[user.name] = obj;
4545
return `Bearer ${obj.status.token}`;
4646
}
4747
throw new Error(result.stderr);

0 commit comments

Comments
 (0)