Releases: ITV/scala-pact
Scala-pact 2.4.0
This release aims to be source-compatible with the previous version, 2.3.18, but includes a number of significant changes. Scala-pact now cross-compiles (where possible) against Scala 2.12.12 and 2.13.3.
-
scala-pact-argonaut-6-2
now cross-compiles against scala 2.13 and has argonaut version bumped to6.2.5
(#179). -
Increased strictness of what is exposed in the public API. The aim is to only expose in the objects
ScalaPactVerify
andScalaPactForger
the building blocks for pact tests, and nothing else. Some things here have moved, others have been made private, but they shouldn't be classes that were being used directly. -
In
ScalaPactVerify
, the timeout for the pact broker client is now configurable forPactSourceType
s that use a broker:pactBrokerUseLatest
,pactBrokerWithTags
,pactBrokerWithVersion
, andpactBrokerWithVersionSelectors
(more on this one later). Previously this timeout was being taken from argument passed to.runVerificationAgainst
and was not separately configurable. -
Sbt setting keys added for configuring the pact broker client timeout, and the ssl context name to be used when using the plugin commands (#181),
pactBrokerClientTimeout
, andsslContextName
, respectively. Similar to above, these were not separately configurable in the past. -
Remove hard-coded client timeout for
ResultsPublisher
(#183). If verification results were being published as part of your tests (using thepublishResultsEnabled
field in the pact source), a hard-coded timeout of 10 seconds was used. This timeout will now be the one configured in either of the above two methods. -
All the functionality of
scalapact-scalatest
can now be used via mix-in in your test suites (#182).The existing behaviour (which remains) requires 3 dependencies (e.g.scalapact-scalatest
,scalapact-http4s-021
andscalapact-circe-0-13
), and explicit importsimport com.itv.scalapact.http._
andimport com.itv.scalapact.json._
to use. Instead, a single dependency can now be used:"com.itv" %% "scalapact-scalatest-suite" % "2.4.0" % "test"
, and two traitsPactVerifySuite
andPactForgerSuite
can be mixed into test suites to use the entire scalapact API without addition imports. (N.B. this using http4s 0.21.x and circe 0.13.0 under the hood). -
If your pact-broker is on version >2.6.x, you can now start making use of the
pacts for verification
endpoint (#178). See the master issue from the pact foundation for more information here: pact-foundation/pact_broker#307. To facilitate this, the scala-pact API has expanded to include a new pact source:pactBrokerWithVersionSelectors
to which you pass a list ofConsumerVersionSelectors
, and a list ofProviderVersionTags
. In addition, new sbt setting keys have been added for the plugin that allow these values to be set in yourpact.sbt
to be used when runningsbt pactVerify
. This feature paves the way for "pending" and "WIP" pacts to be enabled in future releases ofscala-pact
.