You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,13 +292,16 @@ broker_builder = (
292
292
)
293
293
.include_pending()
294
294
.provider_branch('main')
295
-
.consumer_tags('main', 'develop')
295
+
.consumer_version(branch='main')
296
+
.consumer_version(branch='develop')
296
297
.build()
297
298
)
298
299
```
299
300
300
301
The `selector=True` argument returns a [`BrokerSelectorBuilder`][pact.verifier.BrokerSelectorBuilder] instance, which provides methods to configure which pacts to fetch. The `build()` call finalizes the configuration and returns the `Verifier` instance which can then be further configured.
301
302
303
+
The `consumer_version` method provides fine-grained control over which consumer pacts are verified and can be called multiple times to add multiple selectors (combined with a logical OR). The older `consumer_versions` method is now deprecated in favor of `consumer_version`.
.include_wip_since("2023-01-01") # Include WIP pacts since date
99
-
.provider_tags("main", "develop")
100
-
.consumer_tags("production", "main")
99
+
.provider_branch("main")
100
+
.consumer_version(branch="main") # Specific consumer version selectors
101
+
.consumer_version(branch="develop") # Can be called multiple times
101
102
.build() # Build the selector
102
103
)
103
104
104
105
verifier.verify()
105
106
```
106
107
108
+
#### Consumer Version Selectors
109
+
110
+
The `consumer_version` method provides fine-grained control over which consumer pacts are verified. It can be called multiple times to add multiple selectors, which are combined with a logical OR (pacts matching any selector will be included).
0 commit comments