diff --git a/core/pactbroker/src/main/kotlin/au/com/dius/pact/core/pactbroker/PactBrokerClient.kt b/core/pactbroker/src/main/kotlin/au/com/dius/pact/core/pactbroker/PactBrokerClient.kt index b16c5ba3ea..ed598b5a06 100644 --- a/core/pactbroker/src/main/kotlin/au/com/dius/pact/core/pactbroker/PactBrokerClient.kt +++ b/core/pactbroker/src/main/kotlin/au/com/dius/pact/core/pactbroker/PactBrokerClient.kt @@ -164,6 +164,7 @@ interface IPactBrokerClient { providerName: String, selectors: List, providerTags: List = emptyList(), + providerBranches: List = emptyList(), enablePending: Boolean = false, includeWipPactsSince: String? ): Result, Exception> @@ -305,6 +306,7 @@ open class PactBrokerClient( providerName: String, selectors: List, providerTags: List, + providerBranches: List, enablePending: Boolean, includeWipPactsSince: String? ): Result, Exception> { @@ -320,9 +322,9 @@ open class PactBrokerClient( return if (pactsForVerification != null) { val selectorsRawJson = System.getProperty("pactbroker.consumerversionselectors.rawjson") if(!selectorsRawJson.isNullOrBlank()){ - fetchPactsUsingNewEndpointRaw(selectorsRawJson, enablePending, providerTags, includeWipPactsSince, halClient, pactsForVerification, providerName) + fetchPactsUsingNewEndpointRaw(selectorsRawJson, enablePending, providerTags, providerBranches, includeWipPactsSince, halClient, pactsForVerification, providerName) } else { - fetchPactsUsingNewEndpointTyped(selectors, enablePending, providerTags, includeWipPactsSince, halClient, pactsForVerification, providerName) + fetchPactsUsingNewEndpointTyped(selectors, enablePending, providerTags, providerBranches, includeWipPactsSince, halClient, pactsForVerification, providerName) } } else { handleWith { @@ -347,31 +349,34 @@ open class PactBrokerClient( selectorsTyped: List, enablePending: Boolean, providerTags: List, + providerBranches: List, includeWipPactsSince: String?, halClient: IHalClient, pactsForVerification: String, providerName: String ): Result, Exception> { val selectorsJson = jsonArray(selectorsTyped.map { it.toJson() }) - return fetchPactsUsingNewEndpoint(selectorsJson, enablePending, providerTags, includeWipPactsSince, halClient, pactsForVerification, providerName) + return fetchPactsUsingNewEndpoint(selectorsJson, enablePending, providerTags, providerBranches, includeWipPactsSince, halClient, pactsForVerification, providerName) } private fun fetchPactsUsingNewEndpointRaw( selectorsRaw: String, enablePending: Boolean, providerTags: List, + providerBranches: List, includeWipPactsSince: String?, halClient: IHalClient, pactsForVerification: String, providerName: String ): Result, Exception> { - return fetchPactsUsingNewEndpoint(JsonParser.parseString(selectorsRaw), enablePending, providerTags, includeWipPactsSince, halClient, pactsForVerification, providerName) + return fetchPactsUsingNewEndpoint(JsonParser.parseString(selectorsRaw), enablePending, providerTags, providerBranches, includeWipPactsSince, halClient, pactsForVerification, providerName) } private fun fetchPactsUsingNewEndpoint( selectorsJson: JsonValue, enablePending: Boolean, providerTags: List, + providerBranches: List, includeWipPactsSince: String?, halClient: IHalClient, pactsForVerification: String, @@ -385,6 +390,7 @@ open class PactBrokerClient( body["includePendingStatus"] = enablePending if (enablePending) { body["providerVersionTags"] = jsonArray(providerTags) + body["providerVersionBranches"] = jsonArray(providerBranches) if (includeWipPactsSince.isNotEmpty()) { body["includeWipPactsSince"] = includeWipPactsSince } diff --git a/core/pactbroker/src/test/groovy/au/com/dius/pact/core/pactbroker/PactBrokerClientSpec.groovy b/core/pactbroker/src/test/groovy/au/com/dius/pact/core/pactbroker/PactBrokerClientSpec.groovy index c5c70a7f6f..4f06494103 100644 --- a/core/pactbroker/src/test/groovy/au/com/dius/pact/core/pactbroker/PactBrokerClientSpec.groovy +++ b/core/pactbroker/src/test/groovy/au/com/dius/pact/core/pactbroker/PactBrokerClientSpec.groovy @@ -495,7 +495,7 @@ class PactBrokerClientSpec extends Specification { } def selectors = [ new ConsumerVersionSelector('DEV', true, null, null) ] def json = '{"consumerVersionSelectors":[{"latest":true,"tag":"DEV"}],"includePendingStatus":true,' + - '"includeWipPactsSince":"2020-24-06","providerVersionTags":[]}' + '"includeWipPactsSince":"2020-24-06","providerVersionTags":[],"providerVersionBranches":[]}' def jsonResult = JsonParser.INSTANCE.parseString(''' { "_embedded": { diff --git a/docs/system-properties.md b/docs/system-properties.md index d3efe13ca1..bf0ecbb7f7 100644 --- a/docs/system-properties.md +++ b/docs/system-properties.md @@ -37,8 +37,9 @@ Theses are all the system properties used by Pact-JVM | pactbroker.auth.password | Verification (JUnit, JUnit 5) | string value | n | y | n | Password to use when fetching pacts to verify. | | pactbroker.auth.token | Verification (JUnit, JUnit 5) | string value | n | y | n | Bearer token to use when fetching pacts to verify. | | pactbroker.enableInsecureTls | Verification (JUnit, JUnit 5) | true, false | n | y | n | Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates. Use with caution. | -| pactbroker.enablePending | Verification (JUnit, JUnit 5) | true, false | n | y | n | If the pending pacts feature should be enabled when fetching pacts to verify. When this is set to true, the provider tags property also needs to be set (pactbroker.providerTags). | +| pactbroker.enablePending | Verification (JUnit, JUnit 5) | true, false | n | y | n | If the pending pacts feature should be enabled when fetching pacts to verify. When this is set to true, the provider tags or provider branches property also needs to be set (pactbroker.providerTags or pactbroker.providerBranches). | | pactbroker.providerTags | Verification (JUnit, JUnit 5) | tag names | y | y | n | Provider Tags to use to evaluate pending pacts when fetching pacts to verify. | +| pactbroker.providerBranches | Verification (JUnit, JUnit 5) | branch names | y | y | n | Provider Branches to use to evaluate pending pacts when fetching pacts to verify. | | pactbroker.includeWipPactsSince | Verification (JUnit, JUnit 5) | ISO date (YYYY-MM-DD) | n | y | n | The earliest date WIP pacts should be included (ex: YYYY-MM-DD). If no date is provided, WIP pacts will not be included. | | pact.verification.reportDir | Verification (JUnit, JUnit 5) | Directory name | n | y | n | Sets the directory to write any configured verification reports to. | | pactfolder.path | Verification (JUnit, JUnit 5) | Directory name | n | y | n | Directory to fetch pacts from when using the folder loader. | diff --git a/pact-publish/src/test/groovy/broker/PactBrokerClientPactSpec.groovy b/pact-publish/src/test/groovy/broker/PactBrokerClientPactSpec.groovy index 9ff8367f56..a23ca332dc 100644 --- a/pact-publish/src/test/groovy/broker/PactBrokerClientPactSpec.groovy +++ b/pact-publish/src/test/groovy/broker/PactBrokerClientPactSpec.groovy @@ -11,7 +11,7 @@ import com.github.michaelbull.result.Err import com.github.michaelbull.result.Ok import spock.lang.Specification -@SuppressWarnings(['UnnecessaryGetter', 'LineLength', 'NestedBlockDepth', 'AbcMetric', 'MethodSize', 'ClassSize']) +@SuppressWarnings(['GroovyAssignabilityCheck','UnnecessaryGetter', 'LineLength', 'NestedBlockDepth', 'AbcMetric', 'MethodSize', 'ClassSize']) class PactBrokerClientPactSpec extends Specification { private PactBrokerClient pactBrokerClient @@ -917,7 +917,7 @@ class PactBrokerClientPactSpec extends Specification { def result = pactBroker.runTest { server, context -> def consumerPacts = pactBrokerClient.fetchConsumersWithSelectors('Activity Service', [ new ConsumerVersionSelector('test', true, null, null) - ], [], false, '') + ], [], [], false, '') assert consumerPacts instanceof Ok assert consumerPacts.value.size == 2 assert !consumerPacts.value[0].pending @@ -960,7 +960,8 @@ class PactBrokerClientPactSpec extends Specification { latest true } ]) - providerVersionTags(['master']) + providerVersionTags(['tag']) + providerVersionBranches(['master']) includePendingStatus true } willRespondWith(status: 200) @@ -1030,7 +1031,7 @@ class PactBrokerClientPactSpec extends Specification { def result = pactBroker.runTest { server, context -> def consumerPacts = pactBrokerClient.fetchConsumersWithSelectors('Activity Service', [ new ConsumerVersionSelector('test', true, null, null) - ], ['master'], true, '') + ], ['tag'], ['master'], true, '') assert consumerPacts instanceof Ok assert consumerPacts.value.size == 2 assert !consumerPacts.value[0].pending @@ -1073,7 +1074,8 @@ class PactBrokerClientPactSpec extends Specification { latest true } ]) - providerVersionTags(['master']) + providerVersionTags(['tag']) + providerVersionBranches(['master']) includePendingStatus true includeWipPactsSince '2020-06-24' } @@ -1154,7 +1156,7 @@ class PactBrokerClientPactSpec extends Specification { def result = pactBroker.runTest { server, context -> def consumerPacts = pactBrokerClient.fetchConsumersWithSelectors('Activity Service', [ new ConsumerVersionSelector('test', true, null, null) - ], ['master'], true, '2020-06-24') + ], ['tag'], ['master'], true, '2020-06-24') assert consumerPacts instanceof Ok assert consumerPacts.value.size == 2 assert !consumerPacts.value[0].wip diff --git a/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/GradleProviderInfo.kt b/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/GradleProviderInfo.kt index 1de6149753..3ddca47506 100644 --- a/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/GradleProviderInfo.kt +++ b/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/GradleProviderInfo.kt @@ -103,10 +103,11 @@ open class GradleProviderInfo(name: String, val project: Project) : ProviderInfo val pending = brokerConfig!!.enablePending ?: false if (pending && (brokerConfig!!.providerTags.isNullOrEmpty() || - brokerConfig!!.providerTags!!.any { it.trim().isEmpty() })) { + brokerConfig!!.providerTags!!.any { it.trim().isEmpty() }) && (brokerConfig!!.providerBranches.isNullOrEmpty() || + brokerConfig!!.providerBranches!!.any { it.trim().isEmpty() })) { throw GradleScriptException( """ - |No providerTags: To use the pending pacts feature, you need to provide the list of provider names for the provider application version that will be published with the verification results. + |No providerTags or providerBranches: To use the pending pacts feature, you need to provide the list of provider names for the provider application version that will be published with the verification results. | |For instance: | diff --git a/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/PactBrokerConsumerConfig.kt b/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/PactBrokerConsumerConfig.kt index bdd5ff1210..c564ae69a6 100644 --- a/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/PactBrokerConsumerConfig.kt +++ b/provider/gradle/src/main/kotlin/au/com/dius/pact/provider/gradle/PactBrokerConsumerConfig.kt @@ -8,7 +8,8 @@ import au.com.dius.pact.core.pactbroker.ConsumerVersionSelector data class PactBrokerConsumerConfig @JvmOverloads constructor( var selectors: List? = listOf(), var enablePending: Boolean? = false, - var providerTags: List? = listOf() + var providerTags: List? = listOf(), + var providerBranches: List? = listOf() ) { companion object { @JvmStatic diff --git a/provider/gradle/src/test/groovy/au/com/dius/pact/provider/gradle/GradleProviderInfoSpec.groovy b/provider/gradle/src/test/groovy/au/com/dius/pact/provider/gradle/GradleProviderInfoSpec.groovy index b5333a73e3..429ab1cd6f 100644 --- a/provider/gradle/src/test/groovy/au/com/dius/pact/provider/gradle/GradleProviderInfoSpec.groovy +++ b/provider/gradle/src/test/groovy/au/com/dius/pact/provider/gradle/GradleProviderInfoSpec.groovy @@ -32,15 +32,16 @@ class GradleProviderInfoSpec extends Specification { selectors = latestTags('test') enablePending = true providerTags = ['master'] + providerBranches = ['master'] } then: provider.brokerConfig == new PactBrokerConsumerConfig([new ConsumerVersionSelector('test', true, null, null)], - true, ['master']) + true, ['master'], ['master']) } @Unroll - def 'fromPactBroker throws an exception if pending pacts is enabled but there are no provider tags'() { + def 'fromPactBroker throws an exception if pending pacts is enabled but there are no provider tags or provider branches'() { given: def provider = new GradleProviderInfo('provider', Mock(Project)) @@ -49,16 +50,18 @@ class GradleProviderInfoSpec extends Specification { selectors = latestTags('test') enablePending = true providerTags = tags + providerBranches = branches } then: def ex = thrown(GradleScriptException) - ex.message.trim().startsWith('No providerTags: To use the pending pacts feature, you need to provide the list of ' + + ex.message.trim().startsWith('No providerTags or providerBranches: To use the pending pacts feature, you need to provide the list of ' + 'provider names') where: tags << [null, [], ['']] + branches << [null, [], ['']] } def 'supports specifying a fallback tag'() { diff --git a/provider/src/main/java/au/com/dius/pact/provider/junitsupport/loader/PactBroker.java b/provider/src/main/java/au/com/dius/pact/provider/junitsupport/loader/PactBroker.java index bbc09b0519..74f8cd35d8 100644 --- a/provider/src/main/java/au/com/dius/pact/provider/junitsupport/loader/PactBroker.java +++ b/provider/src/main/java/au/com/dius/pact/provider/junitsupport/loader/PactBroker.java @@ -96,6 +96,11 @@ PactBrokerAuth authentication() default @PactBrokerAuth(username = "${pactbroker */ String[] providerTags() default "${pactbroker.providerTags:}"; + /** + * Provider Branches to use to evaluate pending pacts + */ + String[] providerBranches() default "${pactbroker.providerBranches:}"; + /** * The earliest date WIP pacts should be included (ex: YYYY-MM-DD). If no date is provided, WIP pacts will not be * included. diff --git a/provider/src/main/kotlin/au/com/dius/pact/provider/PactBrokerOptions.kt b/provider/src/main/kotlin/au/com/dius/pact/provider/PactBrokerOptions.kt index a9f7b8791e..7f4df5eb6c 100644 --- a/provider/src/main/kotlin/au/com/dius/pact/provider/PactBrokerOptions.kt +++ b/provider/src/main/kotlin/au/com/dius/pact/provider/PactBrokerOptions.kt @@ -11,10 +11,15 @@ data class PactBrokerOptions @JvmOverloads constructor( val enablePending: Boolean = false, /** - * Provider tags. Required if pending pacts are enabled + * Provider tags. Either this or providerBranches if pending pacts are enabled */ val providerTags: List = listOf(), + /** + * Provider branches. Either this or providerTags if pending pacts are enabled + */ + val providerBranches: List = listOf(), + /** * Only include WIP pacts since the provided date. Dates need to be in ISO format (YYYY-MM-DD). * See https://docs.pact.io/pact_broker/advanced_topics/wip_pacts/ diff --git a/provider/src/main/kotlin/au/com/dius/pact/provider/ProviderInfo.kt b/provider/src/main/kotlin/au/com/dius/pact/provider/ProviderInfo.kt index 5252c37f3e..809720b6e5 100644 --- a/provider/src/main/kotlin/au/com/dius/pact/provider/ProviderInfo.kt +++ b/provider/src/main/kotlin/au/com/dius/pact/provider/ProviderInfo.kt @@ -77,8 +77,13 @@ open class ProviderInfo @JvmOverloads constructor ( } else { emptyList() } + val providerBranches = if (enablePending) { + options["providerBranches"] as List? + } else { + emptyList() + } val includePactsSince = Utils.lookupInMap(options, "includeWipPactsSince", String::class.java, "") - val pactBrokerOptions = PactBrokerOptions(enablePending, providerTags.orEmpty(), includePactsSince, false, + val pactBrokerOptions = PactBrokerOptions(enablePending, providerTags.orEmpty(), providerBranches.orEmpty(), includePactsSince, false, PactBrokerOptions.parseAuthSettings(options)) return hasPactsFromPactBrokerWithSelectors(pactBrokerUrl, selectors, pactBrokerOptions) @@ -90,14 +95,15 @@ open class ProviderInfo @JvmOverloads constructor ( selectors: List, options: PactBrokerOptions ): List { - if (options.enablePending && options.providerTags.isEmpty()) { - throw RuntimeException("No providerTags: To use the pending pacts feature, you need to provide the list of " + + if (options.enablePending && options.providerTags.isEmpty() && options.providerBranches.isEmpty()) { + throw RuntimeException("No providerTags or providerBranches: To use the pending pacts feature, you need to provide the list of " + "provider names for the provider application version that will be published with the verification results") } val client = pactBrokerClient(pactBrokerUrl, options) - val consumersFromBroker = client.fetchConsumersWithSelectors(name, selectors, options.providerTags, + val consumersFromBroker = client.fetchConsumersWithSelectors(name, selectors, options.providerTags, options.providerBranches, options.enablePending, options.includeWipPactsSince) .map { results -> results.map { ConsumerInfo.from(it) } } + return when (consumersFromBroker) { is Ok> -> { val list = consumersFromBroker.value diff --git a/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt b/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt index 2a6c9371e0..5344d5ce22 100644 --- a/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt +++ b/provider/src/main/kotlin/au/com/dius/pact/provider/junitsupport/loader/PactBrokerLoader.kt @@ -54,6 +54,7 @@ open class PactBrokerLoader( valueResolver: ValueResolver? = null, val enablePendingPacts: String = "false", val providerTags: List = emptyList(), + val providerBranches: List = emptyList(), val includeWipPactsSince: String = "", val pactBrokerUrl: String? = null, val enableInsecureTls: String = "false", @@ -79,6 +80,7 @@ open class PactBrokerLoader( null, pactBroker.enablePendingPacts, pactBroker.providerTags.toList(), + pactBroker.providerBranches.toList(), pactBroker.includeWipPactsSince, pactBroker.url, pactBroker.enableInsecureTls @@ -216,10 +218,11 @@ open class PactBrokerLoader( "$selectors" } val pending = ep.parseExpression(enablePendingPacts, DataType.BOOLEAN, resolver) as Boolean val providerTags = providerTags.flatMap { ep.parseListExpression(it, resolver) }.filter { it.isNotEmpty() } - if (pending && providerTags.none { it.isNotEmpty() }) { - throw IllegalArgumentException("Pending pacts feature has been enabled, but no provider tags have been " + + val providerBranches = providerBranches.flatMap { ep.parseListExpression(it, resolver) }.filter { it.isNotEmpty() } + if (pending && providerTags.none { it.isNotEmpty() } && providerTags.none { it.isNotEmpty() } && providerBranches.none { it.isNotEmpty() } && providerBranches.none { it.isNotEmpty() }) { + throw IllegalArgumentException("Pending pacts feature has been enabled, but no provider tags or branches have been " + "specified. To use the pending pacts feature, you need to provide the list of provider names for the " + - "provider application version with the providerTags property that will be published with the verification " + + "provider application version with the providerTags or providerBranches property that will be published with the verification " + "results.") } val wipSinceDate = if (pending) { @@ -230,7 +233,7 @@ open class PactBrokerLoader( try { val pactBrokerClient = newPactBrokerClient(uriBuilder.build(), resolver) - val result = pactBrokerClient.fetchConsumersWithSelectors(providerName, selectors, providerTags, pending, + val result = pactBrokerClient.fetchConsumersWithSelectors(providerName, selectors, providerTags, providerBranches, pending, wipSinceDate) var consumers = when (result) { is Ok -> result.value diff --git a/provider/src/test/groovy/au/com/dius/pact/provider/ProviderInfoSpec.groovy b/provider/src/test/groovy/au/com/dius/pact/provider/ProviderInfoSpec.groovy index 58741c281d..3622b636da 100644 --- a/provider/src/test/groovy/au/com/dius/pact/provider/ProviderInfoSpec.groovy +++ b/provider/src/test/groovy/au/com/dius/pact/provider/ProviderInfoSpec.groovy @@ -76,7 +76,7 @@ class ProviderInfoSpec extends Specification { def result = providerInfo.hasPactsFromPactBrokerWithSelectors(options, url, selectors) then: - pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, [], false, '') >> new Ok([ + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, [], [], false, '') >> new Ok([ new PactBrokerResult('consumer', '', url, [], [], false, null, false, false, null) ]) result.size == 1 @@ -84,7 +84,7 @@ class ProviderInfoSpec extends Specification { !result[0].pending } - def 'hasPactsFromPactBrokerWithSelectors - does include pending pacts if the option is present'() { + def 'hasPactsFromPactBrokerWithSelectors - does include pending pacts if the option is present and tags are specified'() { given: def options = [ enablePending: true, @@ -99,7 +99,7 @@ class ProviderInfoSpec extends Specification { def result = providerInfo.hasPactsFromPactBrokerWithSelectors(options, url, selectors) then: - pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], true, '') >> new Ok([ + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], [], true, '') >> new Ok([ new PactBrokerResult('consumer', '', url, [], [], true, null, false, false, null) ]) result.size == 1 @@ -107,7 +107,30 @@ class ProviderInfoSpec extends Specification { result[0].pending } - def 'hasPactsFromPactBrokerWithSelectors - throws an exception if the pending pacts option is present but there is no provider tags'() { + def 'hasPactsFromPactBrokerWithSelectors - does include pending pacts if the option is present and branches are specified'() { + given: + def options = [ + enablePending: true, + providerBranches: ['master'] + ] + def url = 'http://localhost:8080' + def selectors = [ + new ConsumerVersionSelector('test', true, null, null) + ] + + when: + def result = providerInfo.hasPactsFromPactBrokerWithSelectors(options, url, selectors) + + then: + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, [], ['master'], true, '') >> new Ok([ + new PactBrokerResult('consumer', '', url, [], [], true, null, false, false, null) + ]) + result.size == 1 + result[0].name == 'consumer' + result[0].pending + } + + def 'hasPactsFromPactBrokerWithSelectors - throws an exception if the pending pacts option is present but there is no provider tags or provider branches'() { given: def options = [ enablePending: true @@ -122,7 +145,7 @@ class ProviderInfoSpec extends Specification { then: def exception = thrown(RuntimeException) - exception.message == 'No providerTags: To use the pending pacts feature, you need to provide the list of ' + + exception.message == 'No providerTags or providerBranches: To use the pending pacts feature, you need to provide the list of ' + 'provider names for the provider application version that will be published with the verification results' } @@ -141,7 +164,7 @@ class ProviderInfoSpec extends Specification { def result = providerInfo.hasPactsFromPactBrokerWithSelectors(options, url, selectors) then: - pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], true, '') >> new Ok([ + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], [], true, '') >> new Ok([ new PactBrokerResult('consumer', '', url, [], [], false, null, false, false, null) ]) result.size == 1 @@ -165,7 +188,7 @@ class ProviderInfoSpec extends Specification { def result = providerInfo.hasPactsFromPactBrokerWithSelectors(options, url, selectors) then: - pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], true, '2020-05-23') >> new Ok([ + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, ['master'], [], true, '2020-05-23') >> new Ok([ new PactBrokerResult('consumer', '', url, [], [], true, null, true, false, null) ]) result.size == 1 @@ -187,7 +210,7 @@ class ProviderInfoSpec extends Specification { then: providerInfo.pactBrokerClient(_, { it.auth == new Auth.BearerAuthentication('123ABC') }) >> pactBrokerClient - pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, [], false, '') >> new Ok([ + pactBrokerClient.fetchConsumersWithSelectors('TestProvider', selectors, [], [], false, '') >> new Ok([ new PactBrokerResult('consumer', '', url, [], [], true, null, true, false, null) ]) result.size == 1