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

fix: ignore certificate errors for development #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gyss
Copy link

@gyss gyss commented Jul 23, 2021

Description

Running the smoke tests in localhost (MacOs) is not passing due to a certificate error:

Error: net::ERR_CERT_AUTHORITY_INVALID at https://local.ft.com:3002/v2/schema
    at navigate (/Users/aaa/FT/next-api/node_modules/puppeteer/lib/FrameManager.js:120:37)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async FrameManager.navigateFrame (/Users/aaa/FT/next-api/node_modules/puppeteer/lib/FrameManager.js:94:17)
    at async Frame.goto (/Users/aaa/FT/next-api/node_modules/puppeteer/lib/FrameManager.js:406:12)
    at async Page.goto (/Users/aaa/FT/next-api/node_modules/puppeteer/lib/Page.js:674:12)
    at async PuppeteerPage.init (/Users/aaa/FT/next-api/node_modules/@financial-times/n-test/lib/smoke/puppeteer-page.js:168:24)
    at async /Users/aaa/FT/next-api/node_modules/@financial-times/n-test/lib/smoke/verify-url.js:21:3

Reading the project documentation, I found that with NODE_ENV=development the certs checking should be skipped, but that did not happen in my local environment.

I've just added this flag in the smoke tests to ignore the certificates in that scenario

@gyss gyss requested a review from a team as a code owner July 23, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant