mercredi 26 février 2020

How to test interaction of micro-services in gitlab ci?

I have 4 services that are all NodeJS API's, 1 is the 'main-service' and I want to test the routing between the services.

Locally I can do that, I start up the other 3 services and run the test and they succeed.
Now I want to do the same thing, only on gitlab ci, but I can't figure out how.

I have build 4 docker images of the services and in test I pull them all, run the other 3 detached and run the 4th with the test command, but all the routing test fail with for example: 'RequestError: Error: connect ECONNREFUSED 0.0.0.0:9016'.
Locally when I set the adresses of the services with docker it works, but it looks like I can't reach them in gitlab ci.

Anyone an idea of how to do this?

Aucun commentaire:

Enregistrer un commentaire