salaboy / platforms-on-k8s

Platform Engineering on Kubernetes :: Book Examples
https://www.salaboy.com
Apache License 2.0
211 stars 113 forks source link

Use WireMock with Testcontainers or Dagger to test C4p Services #20

Closed salaboy closed 1 year ago

salaboy commented 1 year ago

@mcruzdev Look into this: https://testcontainers.com/guides/testing-rest-api-integrations-using-wiremock/#_using_testcontainers_wiremock_module

Right now, the C4p Service is starting the Agenda Service and the Notification Service to run its tests (to avoid local mocks) but with WireMock and Docker integration we can start a mocked version of the services instead of the real ones (that require redis and Kafka to be started). It will be interesting to see if we can get this working to improve those tests, as right now bootstrapping agenda and notifications with all the infra dependencies is way too much.

mcruzdev commented 1 year ago

TY! @salaboy

mcruzdev commented 1 year ago

Closed by #28