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

chore: add sslCheckDomain property [gh-0] #819

Merged
merged 4 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -9,4 +9,5 @@ new BrowserCheck('homepage-browser-check', {
code: {
entrypoint: path.join(__dirname, 'homepage.test.ts')
},
sslCheckDomain: 'acme.com',
})
7 changes: 7 additions & 0 deletions packages/cli/src/constructs/browser-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export interface BrowserCheckProps extends CheckProps {
* with the Puppeteer or Playwright frameworks.
*/
code: Content|Entrypoint
/**
* A valid fully qualified domain name (FQDN) to check its SSL certificate.
nahuelon marked this conversation as resolved.
Show resolved Hide resolved
*/
sslCheckDomain?: string
}

/**
Expand All @@ -30,6 +34,7 @@ export class BrowserCheck extends Check {
script: string
scriptPath?: string
dependencies?: Array<CheckDependency>
sslCheckDomain?: string

/**
* Constructs the Browser Check instance
Expand All @@ -44,6 +49,7 @@ export class BrowserCheck extends Check {
}
BrowserCheck.applyDefaultBrowserCheckConfig(props)
super(logicalId, props)
this.sslCheckDomain = props.sslCheckDomain
if ('content' in props.code) {
const script = props.code.content
this.script = script
Expand Down Expand Up @@ -127,6 +133,7 @@ export class BrowserCheck extends Check {
script: this.script,
scriptPath: this.scriptPath,
dependencies: this.dependencies,
sslCheckDomain: this.sslCheckDomain || null, // empty string is converted to null
}
}
}
Loading