I'm using Heroku node buildpack to run my express HTTP server.
My HTTP server is used as a callback server
Some client triggers service A and this service talks to my HTTP server to get some data and return a response to the client.
In order to test it, my tests are running the server (using Supertest). They mimic the client which sends a request to service A, then this service A needs to get back to my server. And this way I complete a full loop.
The problem arises when the Heroku tests are running because I don't know where to point service A? Does Heroku prepare some temporary dyno I can trigger while the tests are running?
On my machine, I'm using ngrok to accomplish it.
I was thinking maybe Heroku exposes some URL in the process.env but found nothing interesting there (only a testId field)
Any idea how to run this kind of tests using heroku CI tests?
Aucun commentaire:
Enregistrer un commentaire