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

Examples: remove misleading use of PACT_MOCK variables in examples #270

Closed
mefellows opened this issue Oct 8, 2021 · 3 comments
Closed

Comments

@mefellows
Copy link
Member

The fastapi example (and perhaps the others) are a little misleading to newbies.

The following lines would suggest that there is pact mock on the provider side, when in reality this is the address of the locally running FastAPI provider:

PACT_MOCK_HOST = 'localhost'
PACT_MOCK_PORT = 8000
PACT_URL = "http://{}:{}".format(PACT_MOCK_HOST, PACT_MOCK_PORT)

I'd suggest changing these to PROVIDER_HOST, PROVIDER_PORT and PROVIDER_URL respectively, perhaps with a comment explaining these map to the default host/port combination of the provider.

See this thread for context: https://pact-foundation.slack.com/archives/C9VECUP6E/p1633686950075000

mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 8, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 9, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 9, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 12, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 12, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 12, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 15, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 16, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 18, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 18, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 18, 2021
elliottmurray added a commit that referenced this issue Oct 26, 2021
* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): tidy build and examples and make functionality between Flask and FastAPI consistent

re #270

* test(examples): minor fix for conftest

Co-authored-by: Mike Geeves <mike.geeves@gmail.com>
Co-authored-by: mikegeeves <71873349+mikegeeves@users.noreply.github.com>
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 30, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 30, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 30, 2021
mikegeeves added a commit to mikegeeves/pact-python that referenced this issue Oct 30, 2021
elliottmurray pushed a commit that referenced this issue Oct 31, 2021
…Flask (#274)

* test(examples-fastapi): tidy FastAPI example, making consistent with Flask

re #270

* test(examples-fastapi): tidy FastAPI example, making consistent with Flask

re #270

* test(examples-fastapi): tidy FastAPI example, making consistent with Flask

re #270

* test(examples-fastapi): tidy FastAPI example, making consistent with Flask

re #270
@mikegeeves
Copy link
Contributor

I think this one should be ok to close off now, note the file is now at: https://github.com/pact-foundation/pact-python/blob/master/examples/fastapi_provider/tests/provider/test_provider.py

@sergeyklay
Copy link
Member

/cc @elliottmurray

@mefellows
Copy link
Member Author

mefellows commented Mar 5, 2023

I think this is good to close now.

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

No branches or pull requests

3 participants