Skip to content

Commit

Permalink
liniting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samson-keung committed Aug 29, 2024
1 parent 8d37c8d commit f0f58cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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

0 comments on commit f0f58cd

Please sign in to comment.