Skip to content

Commit

Permalink
test: set sdk-integ-test as profile
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Oct 31, 2024
1 parent 7e298e9 commit d7f3a9d
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions tests/e2e/get-integ-test-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ const { CloudFormationClient, DescribeStackResourcesCommand } = require("../../c
const { S3ControlClient, ListMultiRegionAccessPointsCommand } = require("../../clients/client-s3-control");
const { ensureTestStack } = require("./ensure-test-stack");
const { deleteStaleChangesets } = require("./delete-stale-changesets");
const { loadSharedConfigFiles } = require("@smithy/shared-ini-file-loader");
const { fromIni } = require("@aws-sdk/credential-providers");

exports.getIntegTestResources = async () => {
const ini = await loadSharedConfigFiles();
if (ini.configFile["sdk-integ-test"] || ini.credentialsFile["sdk-integ-test"]) {
process.env.AWS_PROFILE = "sdk-integ-test";
console.log("Setting AWS_PROFILE=sdk-integ-test");
} else {
console.log("AWS_PROFILE is", process.env.AWS_PROFILE);
}

// TODO(debug)
console.log({
config: ini.configFile,
credentials: ini.credentialsFile,
});

const region = "us-west-2";
const cloudformation = new CloudFormationClient({
region,
logger: {
...console,
trace() {},
debug(...args) {
if (String(args[0]).startsWith("endpoints")) {
return;
}
console.debug(...args);
},
info() {},
},
});
const stackName = "SdkReleaseV3IntegTestResourcesStack";

Expand Down

0 comments on commit d7f3a9d

Please sign in to comment.