Skip to content

Commit 0bc9f48

Browse files
author
Steven Yuan
authored
fix(credential-provider-node): update date strings to use fully specified offsets (#5790)
1 parent 6c362fd commit 0bc9f48

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/credential-provider-node/src/credential-provider-node.integ.spec.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jest.mock("@smithy/shared-ini-file-loader", () => {
4141
async getSSOTokenFromFile() {
4242
return {
4343
accessToken: "mock_sso_token",
44-
expiresAt: new Date("3000/1/1").toISOString(),
44+
expiresAt: "3000-01-01T00:00:00.000Z",
4545
};
4646
},
4747
};
@@ -58,7 +58,7 @@ jest.mock("@aws-sdk/client-sso", () => {
5858
accessKeyId: "SSO_ACCESS_KEY_ID",
5959
secretAccessKey: "SSO_SECRET_ACCESS_KEY",
6060
sessionToken: "SSO_SESSION_TOKEN",
61-
expiration: new Date("3000/1/1"),
61+
expiration: new Date("3000-01-01T00:00:00.000Z"),
6262
credentialScope: "us-sso-1",
6363
},
6464
};
@@ -81,7 +81,7 @@ jest.mock("@aws-sdk/client-sts", () => {
8181
AccessKeyId: "STS_AR_ACCESS_KEY_ID",
8282
SecretAccessKey: "STS_AR_SECRET_ACCESS_KEY",
8383
SessionToken: "STS_AR_SESSION_TOKEN",
84-
Expiration: new Date("3000/1/1"),
84+
Expiration: new Date("3000-01-01T00:00:00.000Z"),
8585
CredentialScope: "us-stsar-1__" + (await this.config.region()),
8686
},
8787
};
@@ -92,7 +92,7 @@ jest.mock("@aws-sdk/client-sts", () => {
9292
AccessKeyId: "STS_ARWI_ACCESS_KEY_ID",
9393
SecretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
9494
SessionToken: "STS_ARWI_SESSION_TOKEN",
95-
Expiration: new Date("3000/1/1"),
95+
Expiration: new Date("3000-01-01T00:00:00.000Z"),
9696
CredentialScope: "us-stsarwi-1__" + (await this.config.region()),
9797
},
9898
};
@@ -118,7 +118,7 @@ jest.mock("@smithy/node-http-handler", () => {
118118
AccessKeyId: "CONTAINER_ACCESS_KEY",
119119
SecretAccessKey: "CONTAINER_SECRET_ACCESS_KEY",
120120
Token: "CONTAINER_TOKEN",
121-
Expiration: "3000-01-01T00:00:00Z",
121+
Expiration: "3000-01-01T00:00:00.000Z",
122122
})
123123
);
124124
body.push(null);
@@ -300,7 +300,7 @@ describe("credential-provider-node integration test", () => {
300300
accessKeyId: "SSO_ACCESS_KEY_ID",
301301
secretAccessKey: "SSO_SECRET_ACCESS_KEY",
302302
sessionToken: "SSO_SESSION_TOKEN",
303-
expiration: new Date("3000/1/1"),
303+
expiration: new Date("3000-01-01T00:00:00.000Z"),
304304
credentialScope: "us-sso-1",
305305
});
306306
});
@@ -339,7 +339,7 @@ describe("credential-provider-node integration test", () => {
339339
accessKeyId: "STS_AR_ACCESS_KEY_ID",
340340
secretAccessKey: "STS_AR_SECRET_ACCESS_KEY",
341341
sessionToken: "STS_AR_SESSION_TOKEN",
342-
expiration: new Date("3000/1/1"),
342+
expiration: new Date("3000-01-01T00:00:00.000Z"),
343343
credentialScope: "us-stsar-1__us-east-1",
344344
});
345345
});
@@ -367,7 +367,7 @@ describe("credential-provider-node integration test", () => {
367367
accessKeyId: "STS_AR_ACCESS_KEY_ID",
368368
secretAccessKey: "STS_AR_SECRET_ACCESS_KEY",
369369
sessionToken: "STS_AR_SESSION_TOKEN",
370-
expiration: new Date("3000/1/1"),
370+
expiration: new Date("3000-01-01T00:00:00.000Z"),
371371
credentialScope: "us-stsar-1__us-gov-stsar-1",
372372
});
373373
});
@@ -387,7 +387,7 @@ describe("credential-provider-node integration test", () => {
387387
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
388388
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
389389
sessionToken: "STS_ARWI_SESSION_TOKEN",
390-
expiration: new Date("3000/1/1"),
390+
expiration: new Date("3000-01-01T00:00:00.000Z"),
391391
credentialScope: "us-stsarwi-1__us-east-1",
392392
});
393393
});
@@ -408,7 +408,7 @@ describe("credential-provider-node integration test", () => {
408408
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
409409
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
410410
sessionToken: "STS_ARWI_SESSION_TOKEN",
411-
expiration: new Date("3000/1/1"),
411+
expiration: new Date("3000-01-01T00:00:00.000Z"),
412412
credentialScope: "us-stsarwi-1__us-gov-sts-1",
413413
});
414414
});
@@ -445,7 +445,7 @@ describe("credential-provider-node integration test", () => {
445445
accessKeyId: "SSO_ACCESS_KEY_ID",
446446
secretAccessKey: "SSO_SECRET_ACCESS_KEY",
447447
sessionToken: "SSO_SESSION_TOKEN",
448-
expiration: new Date("3000/1/1"),
448+
expiration: new Date("3000-01-01T00:00:00.000Z"),
449449
credentialScope: "us-sso-1",
450450
});
451451
});
@@ -481,7 +481,7 @@ describe("credential-provider-node integration test", () => {
481481
accessKeyId: "STS_ARWI_ACCESS_KEY_ID",
482482
secretAccessKey: "STS_ARWI_SECRET_ACCESS_KEY",
483483
sessionToken: "STS_ARWI_SESSION_TOKEN",
484-
expiration: new Date("3000/1/1"),
484+
expiration: new Date("3000-01-01T00:00:00.000Z"),
485485
credentialScope: "us-stsarwi-1__us-east-1",
486486
});
487487
});
@@ -497,7 +497,7 @@ describe("credential-provider-node integration test", () => {
497497
accessKeyId: "CONTAINER_ACCESS_KEY",
498498
secretAccessKey: "CONTAINER_SECRET_ACCESS_KEY",
499499
sessionToken: "CONTAINER_TOKEN",
500-
expiration: new Date("3000/1/1"),
500+
expiration: new Date("3000-01-01T00:00:00.000Z"),
501501
});
502502
});
503503

0 commit comments

Comments
 (0)