Annotation Interface PactBroker


@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface PactBroker
Used to point Pact runner to source of pacts for contract tests Default values can be set by setting the `pactbroker.*` system properties
See Also:
  • pact loader
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Authentication to use with the pact broker, by default no authentication is used
    Deprecated.
    Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
    Deprecated.
    Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
    Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates.
    If the pending pacts feature should be enabled.
    Deprecated.
    Use url instead
    The earliest date WIP pacts should be included (ex: YYYY-MM-DD).
    Deprecated.
    Use url instead
    Provider Branches to use to evaluate pending pacts
    Provider Tags to use to evaluate pending pacts
    Deprecated.
    Use url instead
    Deprecated.
    Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
     
    Class<? extends au.com.dius.pact.core.support.expressions.ValueResolver>
    Override the default value resolver for resolving the values in the expressions
  • Element Details

    • url

      String url
      Returns:
      URL of pact broker
      Default:
      "${pactbroker.url:}"
    • host

      Deprecated.
      Use url instead
      Returns:
      host of pact broker
      Default:
      "${pactbroker.host:}"
    • port

      Deprecated.
      Use url instead
      Returns:
      port of pact broker
      Default:
      "${pactbroker.port:}"
    • scheme

      Deprecated.
      Use url instead
      HTTP scheme, defaults to HTTP
      Default:
      "${pactbroker.scheme:http}"
    • tags

      Deprecated.
      Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
      Tags to use to fetch pacts for, defaults to `latest` If you set the tags through the `pactbroker.tags` system property, separate the tags by commas
      Default:
      {"${pactbroker.tags:}"}
    • consumerVersionSelectors

      @Deprecated VersionSelector[] consumerVersionSelectors
      Deprecated.
      Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
      Consumer version selectors to fetch pacts for, defaults to latest version If you set the version selector tags or latest fields through system properties, separate values by commas
      Default:
      {@au.com.dius.pact.provider.junitsupport.loader.VersionSelector(tag="${pactbroker.consumerversionselectors.tags:}", latest="${pactbroker.consumerversionselectors.latest:}", consumer="${pactbroker.consumers:}")}
    • consumers

      @Deprecated String[] consumers
      Deprecated.
      Use consumerVersionSelectors method or pactbroker.consumerversionselectors property instead
      Consumers to fetch pacts for, defaults to all consumers If you set the consumers through the `pactbroker.consumers` system property, separate the consumers by commas
      Default:
      {"${pactbroker.consumers:}"}
    • authentication

      PactBrokerAuth authentication
      Authentication to use with the pact broker, by default no authentication is used
      Default:
      @au.com.dius.pact.provider.junitsupport.loader.PactBrokerAuth(username="${pactbroker.auth.username:}", password="${pactbroker.auth.password:}", token="${pactbroker.auth.token:}")
    • valueResolver

      Class<? extends au.com.dius.pact.core.support.expressions.ValueResolver> valueResolver
      Override the default value resolver for resolving the values in the expressions
      Default:
      au.com.dius.pact.core.support.expressions.SystemPropertyResolver.class
    • enablePendingPacts

      String enablePendingPacts
      If the pending pacts feature should be enabled. This can be set with the pactbroker.enablePending JVM system property. When this is set to true, the provider tags property also needs to be set
      Default:
      "${pactbroker.enablePending:false}"
    • providerTags

      String[] providerTags
      Provider Tags to use to evaluate pending pacts
      Default:
      {"${pactbroker.providerTags:}"}
    • providerBranch

      String providerBranch
      Provider Branches to use to evaluate pending pacts
      Default:
      "${pactbroker.providerBranch:}"
    • includeWipPactsSince

      String includeWipPactsSince
      The earliest date WIP pacts should be included (ex: YYYY-MM-DD). If no date is provided, WIP pacts will not be included.
      Default:
      "${pactbroker.includeWipPactsSince:}"
    • enableInsecureTls

      String enableInsecureTls
      Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates. Use with caution. This can be set with the pactbroker.enableInsecureTls JVM system property.
      Default:
      "${pactbroker.enableInsecureTls:false}"