Skip to content

Commit

Permalink
chore: change credentials.expiration from number to Date (smithy-lang…
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored and srchase committed Jun 16, 2023
1 parent 5a4f017 commit 4644027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ describe("fromImdsCredentials", () => {
expect(converted.accessKeyId).toEqual(creds.AccessKeyId);
expect(converted.secretAccessKey).toEqual(creds.SecretAccessKey);
expect(converted.sessionToken).toEqual(creds.Token);
expect(converted.expiration).toEqual(
Math.floor(new Date(creds.Expiration).valueOf() / 1000)
);
expect(converted.expiration).toEqual(new Date(creds.Expiration));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export function fromImdsCredentials(creds: ImdsCredentials): Credentials {
accessKeyId: creds.AccessKeyId,
secretAccessKey: creds.SecretAccessKey,
sessionToken: creds.Token,
expiration: Math.floor(new Date(creds.Expiration).valueOf() / 1000)
expiration: new Date(creds.Expiration)
};
}

0 comments on commit 4644027

Please sign in to comment.