PactSource

pact4s.provider.PactSource
See thePactSource companion trait
object PactSource

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
PactSource.type

Members list

Type members

Classlikes

final class FileSource extends PactSource

It isn't necessary to use a pact broker to manage consumer pacts (though it is strongly recommended). The pacts can also be directly loaded from files by using this pactSource in ProviderInfoBuilder

It isn't necessary to use a pact broker to manage consumer pacts (though it is strongly recommended). The pacts can also be directly loaded from files by using this pactSource in ProviderInfoBuilder

Value parameters

consumers

A map of consumer names to the file where the pacts are written.

Attributes

Companion
object
Supertypes
trait PactSource
class Object
trait Matchable
class Any
object FileSource

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
FileSource.type
sealed trait PactBroker extends PactSource

Attributes

Supertypes
trait PactSource
class Object
trait Matchable
class Any
Known subtypes
final class PactBrokerWithSelectors extends PactBroker

Value parameters

auth

authentication for accessing the pact broker. Can be token or basic auth.

brokerUrl

pact broker address

consumerVersionSelectors

specifies which consumer pacts should be chosen for verification. Example:

 PactBrokerWithSelectors(
   brokerUrl = "https://test.pact.dius.com.au"
 ).withPendingPactsEnabled
   .withAuth(BasicAuth("dXfltyFMgNOFZAxr8io9wJ37iUpY42M", "O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1"))
   .withWipPactsSince(WipPactsSince.instant(Instant.EPOCH))
   .withConsumerVersionSelectors(ConsumerVersionSelectors.mainBranch)
enablePending

enable pending pacts. Off by default. If enabled, you must provide a provider branch for verifications.

includeWipPactsSince

is a WipPactsSince which wraps an Option. WipPactsSince also has constructors for using java.time.LocalDate and java.time.OffsetDateTime for convenience. All WIP pacts are pending pacts, so we enforce the setting of enablePending if this field is set.

providerTags

deprecated in favour of provider branch. Any tags that are going to be applied to the provider version when the verification results are published. Only used in the pending pact calculation, so will get set to empty when passed to pact-jvm if enablePending is set to false.

Attributes

See also

https://docs.pact.io/pact_broker/advanced_topics/pending_pacts for information on pending and WIP pacts

also the master issue for pending pacts https://github.com/pact-foundation/pact_broker/issues/320

also the master issue for WIP pacts here for more discussion https://github.com/pact-foundation/pact_broker/issues/338

Companion
object
Supertypes
trait PactBroker
trait PactSource
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class PactBrokerWithTags extends PactBroker

Value parameters

auth

authentication for accessing the pact broker. Can be token or basic auth.

brokerUrl

pact broker address

tags

fetches all the latest pacts from the pact-broker for the provider with the given tags, all ignoring tags if tags is empty.

Attributes

Companion
object
Supertypes
trait PactBroker
trait PactSource
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type