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

Add MockServer container #250

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Xeonian
Copy link

@Xeonian Xeonian commented Sep 29, 2022

Add a MockServer container class.

Uses the mockserver-client library to supply a client.

Had to pin grpcio-status dependency for the google-cloud-pubsub extra as the latest version produces conflicting requirements for the protobuf dependency.

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.33%. Comparing base (472da35) to head (0cc2fc8).
Report is 301 commits behind head on main.

❗ Current head 0cc2fc8 differs from pull request most recent head 4e6890b. Consider uploading reports for the commit 4e6890b to get more accurate results

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.
📢 Have feedback on the report? Share it here.

EDGE_PORT = 1080
IMAGE = 'mockserver/mockserver:latest'

def __init__(self, image: str = IMAGE, **kwargs: Any):
Copy link
Collaborator

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:
Copy link
Collaborator

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?

@alexanderankin alexanderankin added the community-feat feature but its a community module so we wont bump tc core for it label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-feat feature but its a community module so we wont bump tc core for it ✨ package: new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants