Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for fromProviderState generator #69

Open
mefellows opened this issue Aug 1, 2024 · 1 comment
Open

Add support for fromProviderState generator #69

mefellows opened this issue Aug 1, 2024 · 1 comment
Labels
enhancement New feature or request smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog

Comments

@mefellows
Copy link
Contributor

Hello, I'm trying to implement gRPC/protobuf tests for my application and I'm wondering if the gRPC/protobuf plugin has something like the valueFromProviderState that the REST API has?
this is in case I would like to inject something like entity ID of an entity created during the state setup into the gRPC call
...
is there a possible workaround for this? (i.e. creating entities as part of the state setup and somehow planting their IDs magically into the request Pact makes)
I'm using a SpringBoot + JUnit5 + PactJVM + Pact protobuf plugin 0.4.0 stack if that matters at all (edited)

Ron's response

It looks like it will work for basic Protobufs, but the gRPC mock server is missing the data from the provider states, so will not be able to inject the values.

Source conversation: https://pact-foundation.slack.com/archives/CEQBDD5U4/p1722289550348409

More generally, it would be good to understand/document how client libraries would need to change to support this feature (if at all). I believe the current implementation assumes a JSON response to the provider state callback, so I'm not sure how it would work on arbitrary content types.

@mefellows mefellows added the enhancement New feature or request label Aug 1, 2024
@rholshausen rholshausen added the smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog label Aug 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-2288). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog
Projects
None yet
Development

No branches or pull requests

2 participants