Skip to content

Feat/ffi provider mike #1

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

Draft
wants to merge 51 commits into
base: feat/ffi-provider
Choose a base branch
from

Conversation

mikegeeves
Copy link
Owner

No description provided.

pulphix and others added 19 commits July 31, 2021 12:24
* feat: message provider implementation

* feat: add basic verify flow

* feat: add missing flask config

* feat: initial flask start setup

* feat: and sample provider test, rename MessageProvider constructor

* feat: move handler to provider

* feat: pass handler as python argument

* feat: pass handler as python argument

* feat: create setup endpoint for message handlers, add setup_state fn, refactor test

* feat: enable context manager in message provider, allow provider to pass Proxy port param, new endpoints to stop/check proxy

* fix: flake8

* fix: revert bad merge to http_proxy; add pydocstyle

* feat: parse content, update readme and test

* test: add missing tests for message provider

* fix: check the pact files exists before running the vefivication

* fix: flake8

* feat: rebase feature from master branch

* fix: remove dead code

* feat: add http_proxy test, replace print with log, use flask localstack to store states

* fix: change PROXY_PORT to 1234 to fix broken build

* fix: flake8

* chore: skip provider test to make the build pass (troubleshooting)

* chore: skip 2 tests that causes BrokenPipeError for investigation

* chore: comment out the broken tests

* fix: change default proxy port to 1234

* feat: updated message consumer test to be compatible with message provider test

* fix: Updated tests that where failing on master branch as well

* feat: ported message_provider to fastapi

* fix: fixed comment

* fix: removed unnecessary pact file updated flask

* fix: added detectcontentlambda-contentprovider.json to .gitignore

Co-authored-by: Tuan Pham <q.tuan.p@gmail.com>
Co-authored-by: William Infante <williaminfante@gmail.com>
…e changes to docker37 which I will need to do to all
The return code is straightforward, but having problems with the logging. When setting up the FFI
objects etc, it doesn't seem to work unless it's a basically a singleton, it seems hard to split up.
I don't like it but going with this for now :)
elif 'linux' in target_platform:
libname = "pact/bin/libpact_ffi-linux-x86_64.so"
elif 'windows' in target_platform:
libname = "pact/bin/pact_ffi-windows-x86_64.dll"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had the osx lib, think this is correct but no Windows to check it actually works

else:
c_args = self.ffi.NULL

# This fails if called a second time after the library has been loaded
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: pull this out before merging, I wanted to try and setup to initialise the library for each call so it is completely independent, but wasn't able to get that to work

<!-- Absolute link for rendering page in docs.pact.io -->
Please read [CONTRIBUTING.md](https://github.com/pact-foundation/pact-python/blob/master/CONTRIBUTING.md)

To setup a development environment:

1. If you want to run tests for all Python versions, install 2.7, 3.3, 3.4, 3.5, and 3.6 from source or using a tool like [pyenv]
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching up with the list in tox.ini

mikegeeves and others added 6 commits August 21, 2021 15:58
mikegeeves and others added 24 commits August 26, 2021 11:51
…dation#257)

* feat: added support for message provider using pact broker

* fix: added new line

* fix: update tests to support pact-broker runs
fix: updated message_pact to wait writing contract process to finish

* fix: removed time from import
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.

4 participants