PactBrokerWithSelectors

pact4s.provider.PactSource$.PactBrokerWithSelectors
See thePactBrokerWithSelectors companion object
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(ProviderTags("MAIN"))
   .withAuth(BasicAuth("dXfltyFMgNOFZAxr8io9wJ37iUpY42M", "O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1"))
   .withWipPactsSince(WipPactsSince.instant(Instant.EPOCH))
   .withConsumerVersionSelectors(ConsumerVersionSelectors.mainBranch)
enablePending

enable pending pacts. Off by default. If enabled, providerTags must be provided.

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

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
Graph
Supertypes
trait PactBroker
trait PactSource
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

this method is somewhat unsafe, as it is illegal to enable pending pacts (of which WIP pacts are a subset) without provider tags being provided.

this method is somewhat unsafe, as it is illegal to enable pending pacts (of which WIP pacts are a subset) without provider tags being provided.

Attributes

Deprecated methods

def withWipPactsSince(since: Instant, providerTags: ProviderTags): PactBrokerWithSelectors

Attributes

Deprecated
[Since version 0.0.19] Use withWipPactsSince(since: WipPactsSince)
def withWipPactsSince(since: LocalDate, providerTags: ProviderTags): PactBrokerWithSelectors

Attributes

Deprecated
[Since version 0.0.19] Use withWipPactsSince(since: WipPactsSince)
def withWipPactsSince(since: OffsetDateTime, providerTags: ProviderTags): PactBrokerWithSelectors

Attributes

Deprecated
[Since version 0.0.19] Use withWipPactsSince(since: WipPactsSince)