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

fix: support multiple states with same name #1168

Merged
merged 2 commits into from
Jan 23, 2024
Merged

fix: support multiple states with same name #1168

merged 2 commits into from
Jan 23, 2024

Conversation

mefellows
Copy link
Member

Fixes #848 using the new ffi_given_with_params core function.

Allows different parameters for the same state name to be reused, resulting in multiple provider states with the same description, but different parameters.

Allows different parameters for the same state name

Fixes #848
@mefellows
Copy link
Member Author

Crap, the pactffi_given_with_params accepts 3 args not 4! I need to do the whole release shenanigans again :P

@YOU54F
Copy link
Member

YOU54F commented Jan 22, 2024

doh! I'll get on that today

@YOU54F YOU54F marked this pull request as ready for review January 22, 2024 18:18
@YOU54F
Copy link
Member

YOU54F commented Jan 22, 2024

Pact-js-core release sorted, and changes pulled into this branch from master, so should be good to go.

Would be good to include a test case that covers this, so we can say its definitely boxed off, maybe we can dust off a repro from the original issue

current ci failures unrelated to original issue, and I'll separately look into that

@mefellows
Copy link
Member Author

Thanks, yes probably need a smoke test suite for the FFI functions in the core (to prevent that bad mapping). Ideally, they are auto generated - just needs some solid spiking time to generate a workable concept.

In Pact JS, the function will be used in lots of places so will get the coverage needed (I think).

As for the failing tests, strange they work on some OS/Arch combinations. Thanks for looking (and raising the upstream in pact reference).

@YOU54F
Copy link
Member

YOU54F commented Jan 23, 2024

windows currently skip the v4 matt plugin test as they were failing in ci (fine locally)

macos/linux covers them which is why are they are red, and the windows are green.

@YOU54F YOU54F merged commit 425603c into master Jan 23, 2024
8 of 26 checks passed
@mefellows mefellows deleted the fix/issue-848 branch January 24, 2024 04:22
@mefellows
Copy link
Member Author

Thank you sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[V3] provider states with the same name are not exported to pact file
2 participants