Is there a way to test out consumer version select...
# general
s
Is there a way to test out consumer version selectors using pact-cli, without running a full-on provider test? If not, can this be considered a feature request? I'd love to contribute, but pact cli is in ruby, and I don't really know enough about it (I've contributed something very minimal in the past and needed help still lol)
m
I think it’s a good idea. It’s one of the areas that’s hardest to reason about, so anything we can do to improve the DX there I think is worth considering.
I’m assuming what you’re suggesting is to make an command that would allow you to test what pacts come back given a set of selectors, perhaps with additional notices as to why they were included? The endpoint exists (obviously) so it’s just a matter of how we’d want to represent it in the CLI.
I was also thinking it would be ideal if the broker returned a list of suggestions for why no pacts were found in the case the list is empty
s
I’m assuming what you’re suggesting is to make an command that would allow you to test what pacts come back given a set of selectors,
Yes
perhaps with additional notices as to why they were included?
that would be even better 🙂
I was also thinking it would be ideal if the broker returned a list of suggestions for why no pacts were found in the case the list is empty
that would be just plain awesome 😄
m
Thanks for confirming. Backing up a little, can you elaborate a little on the problem you’re encountering and trying to solve?
s
Sure. We're trying to adjust our provider tests to automatically verified against consumer branches with a new selector (in addition to existing ones):
Copy code
&provider.ConsumerVersionSelector{Tag: HotfixTag, Latest: true},
It's pretty straightforward, but right now the only way to verify that I'm actually selecting all the necessary consumers is to actually run some tests. Because I'm working in a shared library, this means I need to make changes in another repo to consume the version of this lib and run full tests locally to verify that. If there was a CLI, I would be able to verify this in 2 seconds 🙂 So it's not a blocker or anything, just a good to have feature.