Skip to content

Commit

Permalink
Merge branch 'huijbers/test-interference' of github.com:aws/aws-cdk i…
Browse files Browse the repository at this point in the history
…nto huijbers/test-interference
  • Loading branch information
rix0rrr committed Nov 25, 2024
2 parents 415b32a + acfcfdc commit a534e33
Show file tree
Hide file tree
Showing 10 changed files with 993 additions and 279 deletions.
1 change: 1 addition & 0 deletions packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"jest": "^29.7.0",
"jest-junit": "^14.0.1",
"make-runnable": "^1.4.1",
"mockttp": "^3.15.4",
"npm": "^8.19.4",
"p-queue": "^6.6.2",
"semver": "^7.6.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promises as fs, existsSync } from 'fs';
import { existsSync, promises as fs } from 'fs';
import * as os from 'os';
import * as path from 'path';
import {
Expand All @@ -22,21 +22,22 @@ import { InvokeCommand } from '@aws-sdk/client-lambda';
import { PutObjectLockConfigurationCommand } from '@aws-sdk/client-s3';
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
import { AssumeRoleCommand, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
import * as mockttp from 'mockttp';
import {
integTest,
cloneDirectory,
shell,
withDefaultFixture,
retry,
sleep,
integTest,
randomInteger,
withSamIntegrationFixture,
randomString,
RESOURCES_DIR,
retry,
shell,
sleep,
withCDKMigrateFixture,
withDefaultFixture,
withExtendedTimeoutFixture,
randomString,
withSpecificFixture,
withoutBootstrap,
withSamIntegrationFixture,
withSpecificFixture,
} from '../../lib';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
Expand Down Expand Up @@ -2809,3 +2810,46 @@ integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixtu
expect(output).toContain(`AffectedEnvironments:<aws://${await fixture.aws.account()}/${fixture.aws.region}>`);

}));

integTest('requests go through a proxy when configured',
withDefaultFixture(async (fixture) => {
// Set up key and certificate
const { key, cert } = await mockttp.generateCACertificate();
const certDir = await fs.mkdtemp(path.join(os.tmpdir(), 'cdk-'));
const certPath = path.join(certDir, 'cert.pem');
const keyPath = path.join(certDir, 'key.pem');
await fs.writeFile(keyPath, key);
await fs.writeFile(certPath, cert);

const proxyServer = mockttp.getLocal({
https: { keyPath, certPath },
});

// We don't need to modify any request, so the proxy
// passes through all requests to the host.
const endpoint = await proxyServer
.forAnyRequest()
.thenPassThrough();

proxyServer.enableDebug();
await proxyServer.start();

// The proxy is now ready to intercept requests

try {
await fixture.cdkDeploy('test-2', {
captureStderr: true,
options: [
'--proxy', proxyServer.url,
'--ca-bundle-path', certPath,
],
});
} finally {
await fs.rm(certDir, { recursive: true, force: true });
}

// Checking that there was some interaction with the proxy
const requests = await endpoint.getSeenRequests();
expect(requests.length).toBeGreaterThan(0);
}),
);
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cloudformation-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-cdk/aws-service-spec": "^0.1.34",
"@aws-cdk/service-spec-types": "^0.0.101",
"@aws-cdk/aws-service-spec": "^0.1.35",
"@aws-cdk/service-spec-types": "^0.0.102",
"chalk": "^4",
"diff": "^5.2.0",
"fast-deep-equal": "^3.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/integ-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@aws-cdk/cloud-assembly-schema": "^38.0.0",
"@aws-cdk/cloudformation-diff": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"@aws-cdk/aws-service-spec": "^0.1.34",
"@aws-cdk/aws-service-spec": "^0.1.35",
"cdk-assets": "3.0.0-rc.32",
"@aws-cdk/cdk-cli-wrapper": "0.0.0",
"aws-cdk": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"mime-types": "^2.1.35"
},
"devDependencies": {
"@aws-cdk/aws-service-spec": "^0.1.34",
"@aws-cdk/aws-service-spec": "^0.1.35",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
Expand Down
56 changes: 28 additions & 28 deletions packages/aws-cdk/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-appsync@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-appsync/v/3.696.0 | Apache-2.0
** @aws-sdk/client-appsync@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-appsync/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -824,7 +824,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-cloudformation@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudformation/v/3.696.0 | Apache-2.0
** @aws-sdk/client-cloudformation@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudformation/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -1030,7 +1030,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-cloudwatch-logs@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs/v/3.696.0 | Apache-2.0
** @aws-sdk/client-cloudwatch-logs@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -1236,7 +1236,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-codebuild@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-codebuild/v/3.696.0 | Apache-2.0
** @aws-sdk/client-codebuild@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-codebuild/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -1648,7 +1648,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-cognito-identity@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.696.0 | Apache-2.0
** @aws-sdk/client-cognito-identity@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -1854,7 +1854,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-ec2@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-ec2/v/3.696.0 | Apache-2.0
** @aws-sdk/client-ec2@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-ec2/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -2266,7 +2266,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-ecr@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-ecr/v/3.696.0 | Apache-2.0
** @aws-sdk/client-ecr@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-ecr/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -2472,7 +2472,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-ecs@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-ecs/v/3.696.0 | Apache-2.0
** @aws-sdk/client-ecs@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-ecs/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -2678,7 +2678,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-elastic-load-balancing-v2@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-elastic-load-balancing-v2/v/3.696.0 | Apache-2.0
** @aws-sdk/client-elastic-load-balancing-v2@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-elastic-load-balancing-v2/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -2884,7 +2884,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-iam@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-iam/v/3.696.0 | Apache-2.0
** @aws-sdk/client-iam@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-iam/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -3090,7 +3090,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-kms@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-kms/v/3.696.0 | Apache-2.0
** @aws-sdk/client-kms@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-kms/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -3296,7 +3296,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-lambda@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-lambda/v/3.696.0 | Apache-2.0
** @aws-sdk/client-lambda@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-lambda/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -3502,7 +3502,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-route-53@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-route-53/v/3.696.0 | Apache-2.0
** @aws-sdk/client-route-53@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-route-53/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -3914,7 +3914,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-s3@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-s3/v/3.696.0 | Apache-2.0
** @aws-sdk/client-s3@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-s3/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -4326,7 +4326,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-secrets-manager@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-secrets-manager/v/3.696.0 | Apache-2.0
** @aws-sdk/client-secrets-manager@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-secrets-manager/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -4532,7 +4532,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-sfn@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-sfn/v/3.696.0 | Apache-2.0
** @aws-sdk/client-sfn@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-sfn/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -4738,7 +4738,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-ssm@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-ssm/v/3.696.0 | Apache-2.0
** @aws-sdk/client-ssm@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-ssm/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -5150,7 +5150,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-sso-oidc@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-sso-oidc/v/3.696.0 | Apache-2.0
** @aws-sdk/client-sso-oidc@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-sso-oidc/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -5974,7 +5974,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/client-sts@3.696.0 - https://www.npmjs.com/package/@aws-sdk/client-sts/v/3.696.0 | Apache-2.0
** @aws-sdk/client-sts@3.699.0 - https://www.npmjs.com/package/@aws-sdk/client-sts/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -6394,7 +6394,7 @@ The aws-cdk package includes the following third-party software/licensing:

----------------

** @aws-sdk/credential-provider-cognito-identity@3.696.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.696.0 | Apache-2.0
** @aws-sdk/credential-provider-cognito-identity@3.699.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -7223,7 +7223,7 @@ Apache License

----------------

** @aws-sdk/credential-provider-ini@3.696.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.696.0 | Apache-2.0
** @aws-sdk/credential-provider-ini@3.699.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -7633,7 +7633,7 @@ Apache License

----------------

** @aws-sdk/credential-provider-node@3.696.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.696.0 | Apache-2.0
** @aws-sdk/credential-provider-node@3.699.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -8453,7 +8453,7 @@ Apache License

----------------

** @aws-sdk/credential-provider-sso@3.696.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.696.0 | Apache-2.0
** @aws-sdk/credential-provider-sso@3.699.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -9273,7 +9273,7 @@ Apache License

----------------

** @aws-sdk/credential-providers@3.696.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.696.0 | Apache-2.0
** @aws-sdk/credential-providers@3.699.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -9478,7 +9478,7 @@ Apache License

----------------

** @aws-sdk/ec2-metadata-service@3.696.0 - https://www.npmjs.com/package/@aws-sdk/ec2-metadata-service/v/3.696.0 | Apache-2.0
** @aws-sdk/ec2-metadata-service@3.699.0 - https://www.npmjs.com/package/@aws-sdk/ec2-metadata-service/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -9888,7 +9888,7 @@ Apache License

----------------

** @aws-sdk/lib-storage@3.696.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.696.0 | Apache-2.0
** @aws-sdk/lib-storage@3.699.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -11123,7 +11123,7 @@ Apache License

----------------

** @aws-sdk/middleware-flexible-checksums@3.696.0 - https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums/v/3.696.0 | Apache-2.0
** @aws-sdk/middleware-flexible-checksums@3.697.0 - https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums/v/3.697.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -15649,7 +15649,7 @@ Apache License

----------------

** @aws-sdk/token-providers@3.696.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.696.0 | Apache-2.0
** @aws-sdk/token-providers@3.699.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.699.0 | Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function getRegionFromIniFile(profile: string, data?: any) {
function tryGetCACert(bundlePath?: string) {
const path = bundlePath || caBundlePathFromEnvironment();
if (path) {
debug('Using CA bundle path: %s', bundlePath);
debug('Using CA bundle path: %s', path);
return readIfPossible(path);
}
return undefined;
Expand Down
Loading

0 comments on commit a534e33

Please sign in to comment.