-
Notifications
You must be signed in to change notification settings - Fork 38
test: improved http vs https handling #1768
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
Conversation
132e8ec
to
1d2e2ff
Compare
// we need to disable the TLS certificate check, otherwise the request will fail. | ||
// Refer to the problem discussed in https://github.com/node-fetch/node-fetch/issues/1 | ||
if (this.backendUsesHttps) { | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not set NODE_TLS_REJECT_UNAUTHORIZED globally for a whole test env.
Only if the backend / app runs in https and we use self signed certs.
DOWNSTREAM_DUMMY_URL: this.downstreamDummyUrl, | ||
INSTANA_DISABLE_CA_CHECK: true, | ||
INSTANA_DEV_SEND_UNENCRYPTED: this.opts.backendUsesHttps ? 'false' : 'true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP is default for the test env and sending INSTANA_DEV_SEND_UNENCRYPTED will allow to use an http endpoint.
- NODE_TLS_REJECT_UNAUTHORIZED can create a log.console span - HTTPS without certification -> creates a node warning
Problems: