Skip to content
Merged
  •  
  •  
  •  
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ async function main() {
...passWithNoTests ? ['--passWithNoTests'] : [],
...args['test-file'] ? [args['test-file']] : [],
], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js'));

} finally {
await packageSource.cleanup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async function main() {
type: 'string',
requiresArg: true,
}), async (args) => {

await validateDirectory(args);
const repo = await (args.name ? TestRepository.newWithName(args.name) : TestRepository.newRandom());
const usageDir = UsageDir.default();
Expand All @@ -71,7 +70,6 @@ async function main() {
requiresArg: true,
demandOption: true,
}), async (args) => {

const repo = TestRepository.existing(args.name);
const usageDir = UsageDir.default();

Expand Down Expand Up @@ -99,7 +97,6 @@ async function main() {
default: true,
requiresArg: false,
}), async (args) => {

await validateDirectory(args);
const repo = await TestRepository.newRandom();
const usageDir = UsageDir.default();
Expand All @@ -114,7 +111,6 @@ async function main() {
shell: true,
show: 'always',
});

} finally {
if (args.cleanup) {
await repo.delete();
Expand All @@ -128,7 +124,6 @@ async function main() {
type: 'string',
requiresArg: true,
}), async (args) => {

const usageDir = UsageDir.default();

let repositoryName = args.name;
Expand Down
3 changes: 0 additions & 3 deletions packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export function withAws<A extends TestContext>(
disableBootstrap: boolean = false,
): (context: A) => Promise<void> {
return async (context: A) => {

if (atmosphereEnabled()) {
const atmosphere = new AtmosphereClient(atmosphereEndpoint());
const allocation = await atmosphere.acquire({ pool: atmospherePool(), requester: context.name });
Expand All @@ -59,7 +58,6 @@ export function withAws<A extends TestContext>(
} finally {
await atmosphere.release(allocation.id, outcome);
}

} else {
return regionPool().using(async (region) => {
const aws = await AwsClients.forRegion(region, context.output);
Expand All @@ -68,7 +66,6 @@ export function withAws<A extends TestContext>(
return block({ ...context, disableBootstrap, aws });
});
}

};
}

Expand Down
5 changes: 0 additions & 5 deletions packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ export class TestFixture extends ShellHelper {
public readonly output: NodeJS.WritableStream,
public readonly aws: AwsClients,
public readonly randomString: string) {

super(integTestDir, output);

this.packages = packageSourceInSubprocess();
Expand Down Expand Up @@ -564,11 +563,9 @@ export class TestFixture extends ShellHelper {
* Cleanup leftover stacks and bootstrapped resources
*/
public async dispose(success: boolean) {

// when using the atmosphere service, it does resource cleanup on our behalf
// so we don't have to wait for it.
if (!atmosphereEnabled()) {

const stacksToDelete = await this.deleteableStacks(this.stackNamePrefix);

this.sortBootstrapStacksToTheEnd(stacksToDelete);
Expand Down Expand Up @@ -601,7 +598,6 @@ export class TestFixture extends ShellHelper {
for (const bucket of this.bucketsToDelete) {
await this.aws.deleteBucket(bucket);
}

}

// If the tests completed successfully, happily delete the fixture
Expand Down Expand Up @@ -639,7 +635,6 @@ export class TestFixture extends ShellHelper {

private sortBootstrapStacksToTheEnd(stacks: Stack[]) {
stacks.sort((a, b) => {

if (!a.StackName || !b.StackName) {
throw new Error('Stack names do not exists. These are required for sorting the bootstrap stacks.');
}
Expand Down
2 changes: 0 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ export async function shellWithAction(
reject(new Error(`'${command.join(' ')}' exited with error code ${code}. Output: \n${output}`));
}
});

});
}

Expand All @@ -284,5 +283,4 @@ function killSubProcess(child: child_process.ChildProcess, command: string) {
} else {
child.kill('SIGINT');
}

}
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@
"publishConfig": {
"tag": "latest"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ integTest('can remove customPermissionsBoundary', withoutBootstrap(async (fixtur
throw new Error('Role not found');
}
expect(role.Role.PermissionsBoundary).toBeUndefined();

} finally {
if (policyArn) {
await fixture.aws.iam.send(new DeletePolicyCommand({ PolicyArn: policyArn }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ integTest(
integTest(
'cdk diff doesnt show resource metadata changes',
withDefaultFixture(async (fixture) => {

// GIVEN - small initial stack with default resource metadata
await fixture.cdkDeploy('metadata');

Expand All @@ -1284,7 +1283,6 @@ integTest(
integTest(
'cdk diff shows resource metadata changes with --no-change-set',
withDefaultFixture(async (fixture) => {

// GIVEN - small initial stack with default resource metadata
await fixture.cdkDeploy('metadata');

Expand Down Expand Up @@ -2838,7 +2836,6 @@ integTest(
);

integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => {

const cache = {
expiration: 4125963264000, // year 2100 so we never overwrite the cache
notices: [
Expand Down Expand Up @@ -2872,7 +2869,6 @@ integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixtu

// assert dynamic environments are resolved
expect(output).toContain(`AffectedEnvironments:<aws://${await fixture.aws.account()}/${fixture.aws.region}>`);

}));

integTest('requests go through a proxy when configured',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ new TestjsStack(app, 'TestjsStack');
await fs.writeJson(path.join(context.integTestDir, 'cdk.json'), cdkJson);

await shell.shell(['cdk', 'synth']);

})));
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class TestStack extends cdk.Stack {
notificationTarget: new QueueHook(queue),
});
this.hookName = hook.lifecycleHookName;

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ProfilerGroupIntegrationTest extends Stack {
assumedBy: new AccountRootPrincipal(),
});
profilingGroup.grantRead(readAppRole);

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class TestStack extends Stack {
region: 'eu-west-2',
}],
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class TestStack extends Stack {
removalPolicy: RemovalPolicy.DESTROY,
resourcePolicy: docu,
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export class TestStack extends Stack {
],
removalPolicy: RemovalPolicy.DESTROY,
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class TestStack extends Stack {
writeUnitsPerSecond: 5000,
},
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class TestStack extends Stack {
LogFormat.SRC_PORT,
],
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class EksClusterAlbControllerStack extends Stack {
new CfnOutput(this, 'IngressPingerResponse', {
value: pinger.response,
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class EksClusterStack extends Stack {
clusterName: cluster.clusterName,
},
});

}
}
const app = new cdk8s.App();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class EksClusterStack extends Stack {
}

private assertSimpleCdk8sChart() {

class Chart extends cdk8s.Chart {
constructor(scope: constructs.Construct, ns: string, cluster: eks.ICluster) {
super(scope, ns);
Expand All @@ -192,7 +191,6 @@ class EksClusterStack extends Stack {
clusterName: cluster.clusterName,
},
});

}
}
const app = new cdk8s.App();
Expand Down Expand Up @@ -319,7 +317,6 @@ class EksClusterStack extends Stack {
minCapacity: 2,
machineImageType: eks.MachineImageType.BOTTLEROCKET,
});

}
private assertCapacityX86() {
// add some x86_64 capacity to the cluster. The IAM instance role will
Expand All @@ -344,7 +341,6 @@ class EksClusterStack extends Stack {
this.cluster.addFargateProfile('default', {
selectors: [{ namespace: 'default' }],
});

}
}

Expand All @@ -369,7 +365,6 @@ const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-ipv6-test', {
});

if (process.env.CDK_INTEG_ACCOUNT !== '12345678') {

// only validate if we are about to actually deploy.
// TODO: better way to determine this, right now the 'CDK_INTEG_ACCOUNT' seems like the only way.

Expand All @@ -380,7 +375,6 @@ if (process.env.CDK_INTEG_ACCOUNT !== '12345678') {
if (!supportedRegions.includes(stack.region)) {
throw new Error(`region (${stack.region}) must be configured to one of: ${supportedRegions}`);
}

}

new integ.IntegTest(app, 'aws-cdk-eks-cluster-ipv6', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class EksClusterStack extends Stack {
name: 'config-map',
},
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ class EksClusterStack extends Stack {
}

private assertSimpleCdk8sChart() {

class Chart extends cdk8s.Chart {
constructor(scope: constructs.Construct, ns: string, cluster: eks.ICluster) {
super(scope, ns);
Expand All @@ -163,7 +162,6 @@ class EksClusterStack extends Stack {
clusterName: cluster.clusterName,
},
});

}
}
const app = new cdk8s.App();
Expand Down Expand Up @@ -311,7 +309,6 @@ class EksClusterStack extends Stack {
minCapacity: 2,
machineImageType: eks.MachineImageType.BOTTLEROCKET,
});

}
private assertCapacityX86() {
// add some x86_64 capacity to the cluster. The IAM instance role will
Expand All @@ -336,7 +333,6 @@ class EksClusterStack extends Stack {
this.cluster.addFargateProfile('default', {
selectors: [{ namespace: 'default' }],
});

}
}

Expand All @@ -361,7 +357,6 @@ const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster', {
});

if (process.env.CDK_INTEG_ACCOUNT !== '12345678') {

// only validate if we are about to actually deploy.
// TODO: better way to determine this, right now the 'CDK_INTEG_ACCOUNT' seems like the only way.

Expand All @@ -372,7 +367,6 @@ if (process.env.CDK_INTEG_ACCOUNT !== '12345678') {
if (!supportedRegions.includes(stack.region)) {
throw new Error(`region (${stack.region}) must be configured to one of: ${supportedRegions}`);
}

}

new integ.IntegTest(app, 'aws-cdk-eks-cluster-integ', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class TargetGroupCrossZoneStack extends Stack {
targetType: elbv2.TargetType.INSTANCE,
crossZoneEnabled: true,
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class TargetGroupCrossZoneStack extends Stack {
targetType: elbv2.TargetType.INSTANCE,
crossZoneEnabled: true,
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const response = (ctx) => ctx.args.message
}),
deadLetterQueue: queue,
}));

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class AwsApi extends cdk.Stack {
Plaintext: events.EventField.fromPath('$.detail.Plaintext'),
},
}));

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class GaStack extends Stack {
});

alb.connections.allowFrom(group.connectionsPeer('Peer', vpc), ec2.Port.tcp(443));

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class TestBucketDeployment extends cdk.Stack {
distributionPaths: ['/images/*.png'],
retainOnDelete: false, // default is true, which will block the integration test cleanup
});

}
}

Expand Down
Loading
Loading