Skip to content

Commit 05d9ef8

Browse files
committed
test: what is even going on
1 parent 7b6a9a3 commit 05d9ef8

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

tests/e2e/delete-stale-changesets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ListChangeSetsCommand, DeleteChangeSetCommand } = require("../../clients/client-cloudformation");
1+
const { ListChangeSetsCommand, DeleteChangeSetCommand } = require("@aws-sdk/client-cloudformation");
22

33
exports.deleteStaleChangesets = async (client, stackName) => {
44
const changesets = await client.send(

tests/e2e/ensure-test-stack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {
88
waitUntilStackCreateComplete,
99
DescribeChangeSetCommand,
1010
DeleteChangeSetCommand,
11-
} = require("../../clients/client-cloudformation");
11+
} = require("@aws-sdk/client-cloudformation");
1212

1313
/**
1414
* Deploy the integration test stack if it does not exist. Update the

tests/e2e/get-integ-test-resources.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
const { readFileSync } = require("fs");
22
const { join } = require("path");
3-
const { STSClient, GetCallerIdentityCommand } = require("../../clients/client-sts");
4-
const { CloudFormationClient, DescribeStackResourcesCommand } = require("../../clients/client-cloudformation");
5-
const { S3ControlClient, ListMultiRegionAccessPointsCommand } = require("../../clients/client-s3-control");
3+
const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts");
4+
const { CloudFormationClient, DescribeStackResourcesCommand } = require("@aws-sdk/client-cloudformation");
5+
const { S3ControlClient, ListMultiRegionAccessPointsCommand } = require("@aws-sdk/client-s3-control");
66
const { ensureTestStack } = require("./ensure-test-stack");
77
const { deleteStaleChangesets } = require("./delete-stale-changesets");
88
const { loadSharedConfigFiles } = require("@smithy/shared-ini-file-loader");
9-
const { fromIni } = require("@aws-sdk/credential-providers");
9+
const { createCredentialChain, fromIni, fromHttp } = require("@aws-sdk/credential-providers");
1010

1111
exports.getIntegTestResources = async () => {
1212
const ini = await loadSharedConfigFiles();
13-
if (ini.configFile["sdk-integ-test"] || ini.credentialsFile["sdk-integ-test"]) {
14-
process.env.AWS_PROFILE = "sdk-integ-test";
13+
const profileData = ini.configFile["sdk-integ-test"] ?? ini.credentialsFile["sdk-integ-test"];
14+
if (profileData) {
1515
console.log("Setting AWS_PROFILE=sdk-integ-test");
16+
process.env.AWS_PROFILE = "sdk-integ-test";
17+
if (profileData.role_arn) {
18+
console.log(
19+
`Setting AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=${process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI}`
20+
);
21+
process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = `/role-arn/${profileData.role_arn}`;
22+
}
1623
} else {
1724
console.log("AWS_PROFILE is", process.env.AWS_PROFILE);
1825
}
1926

20-
// TODO(debug)
21-
console.log({
22-
config: ini.configFile,
23-
credentials: ini.credentialsFile,
24-
});
25-
2627
const region = "us-west-2";
2728
const cloudformation = new CloudFormationClient({
2829
region,

0 commit comments

Comments
 (0)