-
Notifications
You must be signed in to change notification settings - Fork 281
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 MockServer container #250
base: main
Are you sure you want to change the base?
Conversation
6cdde9d
to
3c5d9b3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
==========================================
+ Coverage 85.93% 86.33% +0.40%
==========================================
Files 28 29 +1
Lines 782 805 +23
Branches 77 78 +1
==========================================
+ Hits 672 695 +23
Misses 81 81
Partials 29 29 ☔ View full report in Codecov by Sentry. |
EDGE_PORT = 1080 | ||
IMAGE = 'mockserver/mockserver:latest' | ||
|
||
def __init__(self, image: str = IMAGE, **kwargs: Any): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to make use of the port argument so one can overwrite the port?
Since the port can be changed with an environment variable: https://www.mock-server.com/where/docker.html#docker_container_environment_variables
------- | ||
:: | ||
|
||
with MockServerContainer() as mockserver: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to document what the example does?
Add a MockServer container class.
Uses the
mockserver-client
library to supply a client.Had to pin
grpcio-status
dependency for thegoogle-cloud-pubsub
extra as the latest version produces conflicting requirements for theprotobuf
dependency.