Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to configure port on which ScalaMockPactServer listens #232

Closed
gaeljw opened this issue Oct 25, 2021 · 2 comments
Closed

Be able to configure port on which ScalaMockPactServer listens #232

gaeljw opened this issue Oct 25, 2021 · 2 comments

Comments

@gaeljw
Copy link
Contributor

gaeljw commented Oct 25, 2021

ScalaPactMock.startServer() always starts the server on a random port because of the following line:

val scalaPactSettings = ScalaPactSettings(
      ...
      port = Option(0), // `0` means "use any available port".
      ...
    )

(https://github.com/ITV/scala-pact/blob/main/scalapact-scalatest/src/main/scala/com/itv/scalapact/ScalaPactMock.scala#L41)

It would be nice if the port can be chosen via a method parameter.

Do you have any opinion on this? If I provide a PR for this, are you willing to merge it and release it?

@jbwheatley
Copy link
Contributor

sure go for it

@gaeljw
Copy link
Contributor Author

gaeljw commented Oct 31, 2021

Cool, opened a PR if you want to have a look @jbwheatley

@gaeljw gaeljw closed this as completed Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants