-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I've noticed that it appears that any user-supplied TLS options to the InomialClient don't appear to be applied during a re-connection attempt if the connection drops out. This includes specifying a custom root CA certificate used to validate the server's TLS cert.
Following is some output from ql-integration-tests:
$ ./runTests.js -c bryan_dev_ca_root_cert.pem jackpot
Node.js version: v12.6.0
Attempting to connect to wss://bryanmbp2.local/dev/api/events
Connection started to wss://bryanmbp2.local/dev/api/events
Server at <wss://bryanmbp2.local/dev/api/events> is IB7 GraphQL API v12
Skipping all tests in group: account
Skipping all tests in group: note
Skipping all tests in group: dispatch
Skipping all tests in group: stampede
Skipping all tests in group: ratecard
Running tests in group: jackpot
Running test: ./tests/jackpot/recurringCharge.js
1. Create service
Using service specificationUuid: e11ceb35-0c81-4254-812b-9f1d1615653c
2. Create account
onClose, reason=1006
Attempting to reconnect
Re-queueing request R1000003
Attempting to connect to wss://bryanmbp2.local/dev/api/events
Unable to connect: Error: unable to verify the first certificate
Retrying in 10 seconds
Attempting to connect to wss://bryanmbp2.local/dev/api/events
Unable to connect: Error: unable to verify the first certificate
Retrying in 10 seconds
^C
I can trigger this bug by shutting down and restarting the ql server midway through the execution of a test. The unable to verify the first certificate
error message is normally seen if I fail to provide the root CA cert (-c
option of runTests.js) in the first place, since my local ql server has a TLS cert signed with a custom root CA I've created.
I've tried looking through the InomialClient source briefly - I can't see anything immediately wrong that we could be doing, so I'm also thinking of the possibility this could be a bug in the underlying WebSockets library?