Skip to content

Commit

Permalink
test(middleware-sdk-s3): use consistent timestamp in unit test (#5536)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Dec 1, 2023
1 parent 9052f98 commit 9e3bde9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { S3ExpressIdentityProviderImpl } from "./S3ExpressIdentityProviderImpl";

describe(S3ExpressIdentityProviderImpl.name, () => {
const timestamp = Date.now() + 90_000;

const Credentials = {
AccessKeyId: "MOCK_S3_EXPRESS_ACCESS_KEY_ID",
SecretAccessKey: "MOCK_S3_EXPRESS_SECRET_ACCESS_KEY",
SessionToken: "MOCK_S3_EXPRESS_SESSION_TOKEN",
Expiration: new Date(Date.now() + 90_000),
Expiration: new Date(timestamp),
};

const s3ExpressCredentials = {
accessKeyId: "MOCK_S3_EXPRESS_ACCESS_KEY_ID",
secretAccessKey: "MOCK_S3_EXPRESS_SECRET_ACCESS_KEY",
sessionToken: "MOCK_S3_EXPRESS_SESSION_TOKEN",
expiration: new Date(Date.now() + 90_000),
expiration: new Date(timestamp),
};

describe(S3ExpressIdentityProviderImpl.prototype.getS3ExpressIdentity.name, () => {
Expand Down

0 comments on commit 9e3bde9

Please sign in to comment.