Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
H0R5E committed Sep 9, 2024
1 parent 4e645da commit a913fb7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stacks/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ const distribution = buildCDN(
routerHandler,
bucket,
serverHeaders,
cachePolicy,
FQDN,
certificateArn,
cachePolicy,
)

if (FQDN) {
Expand Down
2 changes: 1 addition & 1 deletion stacks/main/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ export function buildCDN(
routerFunction: aws.lambda.Function,
bucket: aws.s3.Bucket,
serverHeaders: string[],
cachePolicy: string,
FQDN?: string,
certificateArn?: pulumi.Input<string>,
cachePolicy: string = 'Managed-CachingOptimized',
): aws.cloudfront.Distribution {
const defaultRequestPolicy = new aws.cloudfront.OriginRequestPolicy(
registerName('DefaultRequestPolicy'),
Expand Down
2 changes: 0 additions & 2 deletions tests/stacks.main.resources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ describe('stacks/main/resources.ts', () => {
role: 'mock',
})
const bucket = new aws.s3.Bucket('MockBucket')
const routes = ['mock/*', 'another/*']
const serverHeaders = ['mock1', 'mock2']
const staticHeaders = ['mock3']
const FQDN = 'server.example.com'
const certificateArn = 'MockCertificateArn'
const bucketId = await promiseOf(bucket.id)
Expand Down

0 comments on commit a913fb7

Please sign in to comment.