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

Feature: PactV3 / VerifierV3 / MessageProvider interface (powered by pact_ffi) #367

Closed
wants to merge 177 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
46703bc
feat(V3): added the todo provider (from Pact-JS)
May 29, 2020
fa2e6d0
feat: first initial consumer test with pact-rust mock server
May 31, 2020
c938353
feat: implemented some V3 matchers
May 31, 2020
628bdfd
feat(V3): write out the pact file on successful test
Jun 1, 2020
d1b4486
feat(V3): add the Pact python version to the pact metadata
Jun 1, 2020
78d37bd
chore: update to latest pact libs
Feb 20, 2021
586df30
Merge branch 'master' into feat/V3
Feb 20, 2021
54b2b4e
chore: get todo test working with latest Rust libs
Feb 21, 2021
eadfa4d
chore: update todo readme
Feb 21, 2021
b12bb5d
feat: todo XML example working
Feb 21, 2021
d533bb7
feat: consumer test with binary file
Feb 21, 2021
8d10d5a
feat: got basic provider verifier working
Feb 21, 2021
4fdabdd
feat: added rust linux/osx support
elliottmurray Jul 17, 2021
2d7f943
feat: fix to pytest request signature@
elliottmurray Jul 17, 2021
488d55f
feat: first ffi interface
elliottmurray Jul 19, 2021
cf77d09
feat: added so file
elliottmurray Jul 19, 2021
f914c50
fix: so now a relative path so picked up by tests (temp fix) Also som…
elliottmurray Jul 19, 2021
cd85969
chore: move dyn libs to libs folder@
elliottmurray Jul 24, 2021
2b67e39
feat: some work on preparing verify call
elliottmurray Jul 24, 2021
60ac756
feat: refactoring to prepare verify
elliottmurray Jul 24, 2021
34f67a7
feat: added rust linux/osx support
elliottmurray Jul 17, 2021
afd0931
feat: fix to pytest request signature@
elliottmurray Jul 17, 2021
6c95248
feat: first ffi interface
elliottmurray Jul 19, 2021
de93a1f
feat: added so file
elliottmurray Jul 19, 2021
be6c971
fix: so now a relative path so picked up by tests (temp fix) Also som…
elliottmurray Jul 19, 2021
4b239e4
chore: move dyn libs to libs folder@
elliottmurray Jul 24, 2021
e7d686a
feat: some work on preparing verify call
elliottmurray Jul 24, 2021
050ee0e
feat: refactoring to prepare verify
elliottmurray Jul 24, 2021
7d18a2f
docs(readme): trivial 'hello world' changes :)
mikegeeves Aug 18, 2021
214c47d
docs(readme): update python versions mentioned to those supported (go…
mikegeeves Aug 18, 2021
a84f856
build(flake8): exclude venv and tox dirs from flake8 linting
mikegeeves Aug 18, 2021
2d30706
build(ffi): use libs from pact dir instead of libs. Bump to 0.0.1. Mi…
mikegeeves Aug 18, 2021
c6ded0a
feat(ffi verifier): very basic call of verify, with no args
mikegeeves Aug 20, 2021
e9c1bb0
feat(ffi verifier): verifier test, looking at log output
mikegeeves Aug 21, 2021
358748f
feat(ffi verifier): verifier test, looking at log output
mikegeeves Aug 21, 2021
070f905
feat(ffi verifier): set log level for output
mikegeeves Aug 21, 2021
cf0bfee
feat(ffi verifier): help and version tests
mikegeeves Aug 21, 2021
3471c12
feat(ffi verifier cli): use FFI to determine the args for the CLI wra…
mikegeeves Aug 22, 2021
11228ed
feat(ffi verifier): add possible values e.g. to loglevel
mikegeeves Aug 23, 2021
69233a6
feat(ffi verify): add in default value
mikegeeves Aug 23, 2021
3486281
feat(ffi verifier cli): handle both flags and options, along with mul…
mikegeeves Aug 26, 2021
283dcef
feat(ffi verifier cli): construct args string from inputs. Call pactf…
mikegeeves Aug 27, 2021
411ad66
feat(ffi verifier): add a first (currently broken) test
mikegeeves Aug 27, 2021
bd809ff
feat(ffi verifier cli): call verifier from CLI
mikegeeves Aug 27, 2021
d773d85
Add support for ENVs, tidy, docs
mikegeeves Sep 8, 2021
a2ce9f4
feat(ffi verifier cli): correct return type of cli_args
mikegeeves Sep 8, 2021
65d99d3
feat(ffi verifier): switch to using the log buffer instead of interme…
mikegeeves Sep 8, 2021
ccb2641
feat(ffi verifier cli): adding in real test using httpserver
mikegeeves Sep 8, 2021
273e1f3
feat(ffi verifier cli): both a successful and an unsuccessful verific…
mikegeeves Sep 8, 2021
55f4e55
feat(ffi verifier): add same success and fail tests to the verifier d…
mikegeeves Sep 8, 2021
8701015
feat(ffi verifier): minor tidy
mikegeeves Sep 8, 2021
087a655
feat(ffi verifier): generate Verifier args class by various methods
mikegeeves Sep 8, 2021
f3601fd
Merge branch 'master' into feat/ffi-provider-mike
mikegeeves Sep 13, 2021
741cf99
feat(ffi verifier): tidy, comments
mikegeeves Sep 13, 2021
5703160
Merge branch 'feat/ffi-provider-mike' of https://github.com/mikegeeve…
mikegeeves Sep 13, 2021
b18128a
refactor(setup.py): minor tidy
mikegeeves Sep 13, 2021
5ebf947
feat(ffi verifier): tidying up
mikegeeves Sep 20, 2021
53819eb
feat(ffi verifier cli): tidy usage etc, add info about ENVs being used
mikegeeves Sep 21, 2021
3882837
test(pact): fixing tests, failing after allowRedirect was added elsew…
mikegeeves Sep 21, 2021
3c82f1f
refactor(setup.py): black
mikegeeves Sep 21, 2021
778ef4c
feat(ffi): use the same approach to download the FFI libs as the Ruby…
mikegeeves Sep 21, 2021
f91e9b1
Merge branch 'feat/ffi-provider' into feat/ffi-provider-mike
mikegeeves Sep 21, 2021
d21f906
Merge branch 'feat/ffi-provider-mike' of github.com:mikegeeves/pact-p…
YOU54F Nov 20, 2022
8704666
chore: dl ffi & ruby
YOU54F Nov 20, 2022
331e9f0
chore: extract ffi & ruby
YOU54F Nov 20, 2022
fe9e49a
chore: rm ffi & ruby archives
YOU54F Nov 20, 2022
db28c44
chore: arm64 m1 support
YOU54F Nov 20, 2022
c4e8bf2
chore: update tests/ffi/test_ffi_verifier.py
YOU54F Nov 20, 2022
7b30792
chore: add missing deps
YOU54F Nov 20, 2022
a6edc5f
feat(verifier): support all verification modes - local and broker
YOU54F Jun 15, 2023
399a325
chore(standalone): use v2.0.2 of pact-ruby-standalone
YOU54F Jun 15, 2023
b549cc9
chore(docker): support testing examples with docker on non linux systems
YOU54F Jun 15, 2023
e38f869
feat(verifier): verify_with_broker via pact url
YOU54F Jun 15, 2023
3f7fa54
chore: lint
YOU54F Jun 15, 2023
bd7c316
chore: lint
YOU54F Jun 15, 2023
e102203
chore(docker): override url if not linux
YOU54F Jun 15, 2023
dbf30bb
chore(docker): linux gha
YOU54F Jun 16, 2023
bad4cb6
chore(docker): support macos
YOU54F Jun 16, 2023
e93a34d
Merge branch 'feat/ffi-provider' into feat/ffi
YOU54F Jun 16, 2023
9e6f1ec
chore(ffi): use latest ffi
YOU54F Jun 16, 2023
7e3de6f
chore(ffi): dynamically read in header file to load ffi namespace
YOU54F Jun 16, 2023
ca809d1
chore(ffi): allow setting of PACT_FFI_PATH and flake8/doc fixes
YOU54F Jun 16, 2023
efa6e0c
chore(python) replace f string usage for format for 3.6/3.7
YOU54F Jun 16, 2023
6915fe3
ci(cirrus): use non slim image, python -m flake8
YOU54F Jun 16, 2023
c99dd56
ci(test): test with 2.0.1 standalone
YOU54F Jun 16, 2023
532a756
chore: show errors when downloading
YOU54F Jun 16, 2023
95b55f4
chore: dl with urblib3 and backoff
YOU54F Jun 16, 2023
950345b
chore: --version args on pact-verifier and pact-verifier-ffi
YOU54F Jun 16, 2023
cc1a3e0
chore(ffi): start usign shared verifier
YOU54F Jun 17, 2023
440aacd
chore(ffi): initita ffi verifier progress
YOU54F Jun 17, 2023
22b12a8
chore(ffi_verifier): support local and url based pacts for verification
YOU54F Jun 17, 2023
3bbf431
feat: ffi verifier broker + beginning of plugin verification
YOU54F Jul 7, 2023
9ea9f24
chore: flake8 errors
YOU54F Jul 7, 2023
6644cb2
chore: allow setting of PACT_FFI_PATH for tox
YOU54F Jul 7, 2023
858addd
fix: paths to ffi lib names for non macos arm platforms
YOU54F Jul 7, 2023
7bf1a73
test: use test.pactflow with uploaded pacts
YOU54F Jul 7, 2023
5b5dda9
test: skip cli ffi tests as issues with conflicting logs - pactffi_fe…
YOU54F Jul 7, 2023
a3810c5
chore(ci): macos arm64 set VERSION env var
YOU54F Jul 7, 2023
0811665
chore: move PACT_FFI_PATH to constants
YOU54F Jul 26, 2023
e492da6
chore: update release script to support beta release tag formats
YOU54F Jul 26, 2023
f7b75ea
feat(examples): showcase FFIVerify for HTTP
YOU54F Jul 26, 2023
f1cea52
feat: MessageProvider Verifier with FFIVerify plus examples
YOU54F Jul 26, 2023
5dea5dc
Merge remote-tracking branch 'origin/master' into feat/ffi
YOU54F Jul 26, 2023
e5d46e9
feat: MessageProvider now returns VerifyResult(return_code, logs)
YOU54F Jul 26, 2023
c867226
chore: avoid full path when checking for error message in test
YOU54F Jul 26, 2023
6916758
chore(test): add PACT_DO_NOT_TRACK
YOU54F Jul 26, 2023
6e69633
chore(test): add PACT_DO_NOT_TRACK
YOU54F Jul 26, 2023
8c07bc3
chore(test): windows has diff error for file not found
YOU54F Jul 26, 2023
28776c2
chore!: drop ci testing of python 3.6 - fails in cirrus
YOU54F Jul 26, 2023
703bac6
test: showcase grpc v4 pact verification
YOU54F Jul 26, 2023
11ed3c2
ci(gha): test windows with plugins only
YOU54F Jul 26, 2023
8ce9f57
ci: renable all os
YOU54F Jul 26, 2023
823fb49
chore(deps): update grpcio/grpcio-tools to latest
YOU54F Jul 26, 2023
884fd8b
test: add v2-http ffi verifier test with local pact
YOU54F Jul 27, 2023
0317427
chore: reorder shutdown before getting logs
YOU54F Jul 27, 2023
aa6fad5
chore: pactffi_string_delete after decoding pactffi_verifier_logs
YOU54F Jul 27, 2023
38a8caf
test: reinstate ffi cli tests
YOU54F Jul 27, 2023
7145a02
test: local http v3 pact verification with matchers
YOU54F Jul 27, 2023
7b5b3a0
feat: show initial pact consumer ffi examples
YOU54F Jul 27, 2023
45ba04a
chore: write pact-python version to pact
YOU54F Jul 28, 2023
3ffa208
feat: initial pact ffi_consumer
YOU54F Jul 28, 2023
1e16761
feat: MockServer class
YOU54F Jul 28, 2023
145f0b3
Merge remote-tracking branch 'you54f/feat/v3' into feat/ffi_consumer_…
YOU54F Jul 31, 2023
67cf669
feat: V3Verifier
YOU54F Jul 31, 2023
9735923
docs: upgrade guide for VerifierV3
YOU54F Jul 31, 2023
9397511
chore: doc style
YOU54F Aug 1, 2023
c902f21
chore: fixup array of pointers
YOU54F Aug 1, 2023
ed1533f
feat: PactV3 interfact with V3Matcher
YOU54F Aug 1, 2023
113cec7
chore: docstyle
YOU54F Aug 1, 2023
f792b88
chore: use content-type from header
YOU54F Aug 1, 2023
956a813
chore: rename upgrades docs, windows doesnt like it
YOU54F Aug 1, 2023
79b6c6f
chore: NamedTuple not TypedDict for 3.7
YOU54F Aug 1, 2023
128bb81
chore: remove f string for 3.7 flake8
YOU54F Aug 1, 2023
0838fc2
chore: update e2e examples to use VerifierV3
YOU54F Aug 1, 2023
4b57fdc
chore: verifier.verify_pacts +
YOU54F Aug 1, 2023
ec68ea7
chore: add Format to V3Matcher Class
YOU54F Aug 1, 2023
2f39884
feat: test_user_consumer with PactV3 interface
YOU54F Aug 1, 2023
1dbc60d
feat: todo xml example (note issues)
YOU54F Aug 1, 2023
f18cefb
chore: linting
YOU54F Aug 1, 2023
706b26d
chore: linting
YOU54F Aug 1, 2023
b5db6b3
chore(deps): libpact_ffi 0.4.7
YOU54F Aug 1, 2023
3a6f853
chore: yak shave xml content types
YOU54F Aug 1, 2023
37e77ce
chore: flake8
YOU54F Aug 1, 2023
d579913
chore(test): todo verifier expected to fail atm
YOU54F Aug 1, 2023
59e2ef6
chore: allow conditional running with PactFlow for a self-hosted broker
YOU54F Aug 2, 2023
577e84b
ci(test): support running examples on macos/linux
YOU54F Aug 2, 2023
606efec
chore: use .bat ext for ruby standalone on win
YOU54F Aug 2, 2023
cd13fdd
chore: use .bat ext for ruby standalone on win
YOU54F Aug 2, 2023
ce2a3b7
ci: just test on windows for now
YOU54F Aug 2, 2023
5f9fd62
ci(win): use os.join for multiplat paths in sharedfixture
YOU54F Aug 2, 2023
b7cec07
ci(win): skip flask
YOU54F Aug 2, 2023
3370a3c
ci(win): skip messaging, 2 provider tests fail
YOU54F Aug 2, 2023
48d1dee
ci(win): only use fork on macos https://github.com/pytest-dev/pytest-…
YOU54F Aug 2, 2023
29b95db
ci: renable everything, skip todo provider on windows
YOU54F Aug 2, 2023
c2a9999
ci(test): try 127.0.0.1 for flask provider
YOU54F Aug 3, 2023
d1a0735
ci: test messaging provider
YOU54F Aug 3, 2023
9a4c5e6
ci: add testcontainers in examples/message
YOU54F Aug 3, 2023
460fab3
ci: 127.0.0.1 in message provider for win
YOU54F Aug 3, 2023
efd2a6d
ci: set 127.0.0.1 as default for MessageProvider
YOU54F Aug 3, 2023
68d3675
chore: update test for MessageProvider to expect 127.0.0.1
YOU54F Aug 3, 2023
4f4feb9
chore: reinstate testing all examples bar todo
YOU54F Aug 3, 2023
019957a
ci: reinstate full version testing
YOU54F Aug 3, 2023
8c743cd
chore: workarounds for python 3.6
YOU54F Aug 3, 2023
47632c7
chore: move grpc tests into examples folder
YOU54F Aug 3, 2023
6615780
chore: ignore grpc autogenned files
YOU54F Aug 3, 2023
23176f2
ci: test cirrus cli with python 3.6
YOU54F Aug 3, 2023
df42bbb
ci(3.6) - enable for GHA
YOU54F Aug 3, 2023
4e5bc9b
ci: renable all versions
YOU54F Aug 3, 2023
b6570f7
feat: binary payload test example in todo consumer
YOU54F Aug 3, 2023
a031bb7
chore: pydocstyle
YOU54F Aug 3, 2023
43e3e9c
chore: add binary payload test
YOU54F Aug 4, 2023
e087206
chore: test todo pickle errors
YOU54F Aug 4, 2023
dea4c12
chore: test todo, binary content yak shave
YOU54F Aug 7, 2023
1b319b1
ci: test with image/jpeg on consumer + test
YOU54F Aug 7, 2023
00b1843
fix: x-plat mime type detection issues
YOU54F Aug 7, 2023
9c202f5
chore: set content-type conditionally
YOU54F Aug 7, 2023
18218e3
Merge pull request #1 from YOU54F/test/todo_binary
YOU54F Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update todo readme
Ronald Holshausen committed Feb 21, 2021
commit eadfa4d148a0cdd3d7bc9edfff426ec5a16574f2
37 changes: 33 additions & 4 deletions examples/v3/todo/README.md
Original file line number Diff line number Diff line change
@@ -11,22 +11,51 @@ Until the beta version of Pact-Python with V3 support is released, you need to d

Use the Rustup tool from https://rustup.rs/ to do this.

2. Generate the pact_python_v3 wheel
2. Setup a Python virtual environment

```console
$ python3 -m venv venv
$ source venv/bin/activate
```

3. Generate the pact_python_v3 wheel

In the pact-python-v3 directory, use maturin to create the wheel for your architecture and OS:

```console
$ cd pact-python-v3
$ cd ../../../pact-python-v3
$ maturin build
```

This should output the path to the newly created wheel.

3. Install the wheel with pip
4. Install the wheel with pip

```console
# NOTE: this path is architecture and OS dependent, don't just copy this line and hope it works for you
$ pip install pact-python-v3/target/wheels/pact_python_v3-0.0.0-cp38-cp38-manylinux2010_x86_64.whl
$ pip install ../../../pact-python-v3/target/wheels/pact_python_v3-0.0.0-cp38-cp38-manylinux2010_x86_64.whl
```

5. In the project root, build the Pact-Python package as per the instructions in the Readme

```console
$ cd ../../..
$ make package
```

**NOTE:** I had to run the package command myself, because I have both Python 2 and 3 and the
make file was picking up Python 2

```console
$ # If the command above fails
$ python3 setup.py sdist
```

6. Install the Pact Python package

```console
$ cd -
$ pip install ../../../dist/pact-python-2.0.0b0.tar.gz
```

5. Install all the required packages