Annotation Type VersionedPactUrl
-
@Retention(RUNTIME) @Target(TYPE) @Inherited public @interface VersionedPactUrlUsed to point Pact runner to a versioned source of pacts for contract tests.Use ${any.variable} in the url and specify any.variable as a system property.
For example, when you annotate a provider test class with:
And pass a system property foo.version to the JVM, for example -Dfoo.version=123@VersionedPactUrl(urls = {"http://artifactory:8081/artifactory/consumercontracts/foo-bar/${foo.version}/foo-bar-${foo.version}.json"})Then the pact tests will fetch the following contract:
http://artifactory:8081/artifactory/consumercontracts/foo-bar/123/foo-bar-123.json- See Also:
pact loader
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String[]urls
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description AuthenticationauthAuthentication to use, if needed.
-
-
-
-
auth
Authentication auth
Authentication to use, if needed. For basic auth, set the username and password. For bearer tokens, use the token attribute.- Default:
- @au.com.dius.pact.provider.junitsupport.loader.Authentication
-
-