Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liniting fixes #31256

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const bucket = new s3.Bucket(stack, 'Bucket', {
});
const s3Origin = origins.S3BucketOrigin.withBucketDefaults(bucket);
const distribution = new cloudfront.Distribution(stack, 'Distribution', {
defaultBehavior: { origin: s3Origin},
defaultBehavior: { origin: s3Origin },
});

const integ = new IntegTest(app, 's3-origin-oac', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const originAccessIdentity = new cloudfront.OriginAccessIdentity(stack, 'OriginA
});
const s3Origin = origins.S3BucketOrigin.withOriginAccessIdentity(bucket, { originAccessIdentity });
const distribution = new cloudfront.Distribution(stack, 'Distribution', {
defaultBehavior: { origin: s3Origin},
defaultBehavior: { origin: s3Origin },
});

const integ = new IntegTest(app, 's3-origin-oac', {
Expand Down Expand Up @@ -48,6 +48,6 @@ integ.assertions.awsApiCall('CloudFront', 'getCloudFrontOriginAccessIdentity', {
CloudFrontOriginAccessIdentityConfig: {
CallerReference: Match.stringLikeRegexp('^[A-Za-z0-9-]+$'),
Comment: 'OAI for my awesome test s3 origin',
}
}
},
},
}));
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const stack = new cdk.Stack(app, 'cloudfront-s3-static-website-origin');
const bucket = new s3.Bucket(stack, 'Bucket', {
removalPolicy: cdk.RemovalPolicy.DESTROY,
});
const s3Origin = new origins.S3StaticWebsiteOrigin({bucket});
const s3Origin = new origins.S3StaticWebsiteOrigin({ bucket });
const distribution = new cloudfront.Distribution(stack, 'Distribution', {
defaultBehavior: {
origin: s3Origin,
Expand All @@ -36,9 +36,9 @@ integ.assertions.awsApiCall('CloudFront', 'getDistributionConfig', {
HTTPSPort: 443,
OriginProtocolPolicy: 'http-only',
OriginSslProtocols: {
Items: ['TLSv1.2']
}
}
Items: ['TLSv1.2'],
},
},
}),
]),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ describe('S3BucketOrigin', () => {

it('should warn user bucket policy is not updated', () => {
Annotations.fromStack(stack).hasWarning('/Default/MyDistributionA/Origin1',
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n' +
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n' +
'See the "Setting up OAC with imported S3 buckets" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOac]');
});

Expand Down Expand Up @@ -1150,7 +1150,7 @@ describe('S3BucketOrigin', () => {

it('should warn user bucket policy is not updated', () => {
Annotations.fromStack(distributionStack).hasWarning('/distributionStack/MyDistributionA/Origin1',
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n' +
'Cannot update bucket policy of an imported bucket. You will need to update the policy manually instead.\n' +
'See the "Setting up OAI with imported S3 buckets (legacy)" section of module\'s README for more info. [ack: @aws-cdk/aws-cloudfront-origins:updateImportedBucketPolicyOai]');
});

Expand Down
Loading