0

I am trying to introduce Pact in our company. However the consumer calls APIs using providers SDKs and the host-port is dynamically determined using Kubernetes. I am new to all this backend technology so trying to understand how do we deal with this since it will be impossible to get host/port into pom.xml if its dynamic?

PaChSu
  • 297
  • 3
  • 13

1 Answers1

0

It depends whether you're talking about port of the mock service in the consumer tests, or the port of the provider in the verification step.

In the consumer tests, is it possible to provide a test implementation of the part of the SDK that looks up the port? Perhaps you could contact the provider team to see they could supply one that would allow you to set a known port?

In regards to the provider, you would typically run the verification step against a locally running provider in the CI build, not against one deployed into a live environment, so a known port should be able to be used.

Beth Skurrie
  • 1,333
  • 7
  • 8