Skip to content

Commit

Permalink
fix(VpcInstanceAuthenticator): use correct version string
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
  • Loading branch information
padamstx committed Jan 9, 2023
1 parent d721ad8 commit 4a1411a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions auth/token-managers/vpc-instance-token-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2021, 2022.
* (C) Copyright IBM Corp. 2021, 2023.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@ import { atMostOne } from '../utils';
import { JwtTokenManager, JwtTokenManagerOptions } from './jwt-token-manager';

const DEFAULT_IMS_ENDPOINT = 'http://169.254.169.254';
const METADATA_SERVICE_VERSION = '2021-09-20';
const METADATA_SERVICE_VERSION = '2022-03-01';

/** Configuration options for VPC token retrieval. */
interface Options extends JwtTokenManagerOptions {
Expand Down
6 changes: 3 additions & 3 deletions test/unit/vpc-instance-token-manager.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-alert, no-console */

/**
* Copyright 2021 IBM Corp. All Rights Reserved.
* Copyright 2021, 2023 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('VPC Instance Token Manager', () => {
expect(parameters.options.method).toBe('PUT');

expect(parameters.options.qs).toBeDefined();
expect(parameters.options.qs.version).toBe('2021-09-20');
expect(parameters.options.qs.version).toBe('2022-03-01');

expect(parameters.options.body).toBeDefined();
expect(parameters.options.body.expires_in).toBe(300);
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('VPC Instance Token Manager', () => {
expect(parameters.options.method).toBe('POST');

expect(parameters.options.qs).toBeDefined();
expect(parameters.options.qs.version).toBe('2021-09-20');
expect(parameters.options.qs.version).toBe('2022-03-01');

// if neither the profile id or crn is set, then the body should be undefined
expect(parameters.options.body).toBeUndefined();
Expand Down

0 comments on commit 4a1411a

Please sign in to comment.