-
Notifications
You must be signed in to change notification settings - Fork 300
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
feat(core): Added ServerContainer #595
feat(core): Added ServerContainer #595
Conversation
Added doctest to SrcContainer and update readme Fix issue with SrcContainer image handle Add test for SrcContainer Fixed doctest Improve SrvContainer Fix test_srv_container logs check Improve SrvContainer and update tests Updates for SrvContainer
some thoughts:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
=======================================
Coverage ? 79.55%
=======================================
Files ? 10
Lines ? 582
Branches ? 80
=======================================
Hits ? 463
Misses ? 92
Partials ? 27 ☔ View full report in Codecov by Sentry. |
Yes, you are right, So to conclude I think we should keep |
for context, we are trying to remove DbContainer as well. will take a look. |
I can offer another alternative, completely skip |
fa0c2f2
to
a239b79
Compare
opened Tranquility2#2 |
…refactor * fix the docs so that we can mark DbContainer as deprecated for removal * add a warning to ServerContainer just in case it is actually possible to move it out of core * use glob for modules/index.rst * clean up the table of contents so that deprecated classes do not appear on the front page * prepare to refactor the dockerimage stuff with the same class name/structure as Java (DockerImageName, ImageFromDockerfile)
rebased with new improvements |
🤖 I have created a release *beep* *boop* --- ## [4.6.0](testcontainers-v4.5.1...testcontainers-v4.6.0) (2024-06-18) ### Features * **core:** Added ServerContainer ([#595](#595)) ([0768490](0768490)) * **core:** Image build (Dockerfile support) ([#585](#585)) ([54c88cf](54c88cf)) ### Bug Fixes * Add Cockroach DB Module to Testcontainers ([#608](#608)) ([4aff679](4aff679)) * Container for Milvus database ([#606](#606)) ([ec76df2](ec76df2)) * move TESTCONTAINERS_HOST_OVERRIDE to config.py ([#603](#603)) ([2a5a190](2a5a190)), closes [#602](#602) * **mqtt:** Add mqtt.MosquittoContainer ([#568](#568)) ([#599](#599)) ([59cb6fc](59cb6fc)) ### Documentation * **main:** Private registry ([#598](#598)) ([9045c0a](9045c0a)) * Update private registry instructions ([#604](#604)) ([f5a019b](f5a019b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
As part of the effort described, detailed and presented on #559 This is the third PR (out of 4) that should provide all the groundwork to support containers running a server. As discussed on #595 this PR aims to refactor the `ServerContainer` under a new dedicated module called "generic". ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/b7a3395b-ce3c-40ef-8baa-dfa3eff1b056) The idea is that this module could include multiple generic implementations such as ```server.py``` with the proper documentation and examples to allow users simpler usage and QOL. This PR adds the original FastAPI implementation as a simple doc example, I think this aligns better following #595 Next in line is ```feat(core): Added AWS Lambda module``` Based on the work done on #585 and #595 Expended from issue #83 --- Please note an extra commit is included to simulate the relations when importing between and with other modules.
As part of the effort described, detailed and presented on #559 This is the 4th (and final in this track) PR that should provide support for AWS Lambda containers. This module will add the ability to test and run Amazon Lambdas (using the built-in runtime interface emulator) For example: ```python from testcontainers.aws import AWSLambdaContainer from testcontainers.core.waiting_utils import wait_for_logs from testcontainers.core.image import DockerImage with DockerImage(path="./modules/aws/tests/lambda_sample", tag="test-lambda:latest") as image: with AWSLambdaContainer(image=image, port=8080) as func: response = func.send_request(data={'payload': 'some data'}) assert response.status_code == 200 assert "Hello from AWS Lambda using Python" in response.json() delay = wait_for_logs(func, "START RequestId:") ``` This can (and probably will) be used with the provided [LocalStackContainer](https://testcontainers-python.readthedocs.io/en/latest/modules/localstack/README.html) to help simulate more advance AWS cases. --- Based on the work done on: - #585 - #595 - #612 Expended from issue #83
As part of the effort described, detailed and presented on #559
This is the seconds PR (out of 4) that should provide all the groundwork to support containers running a server.
This would allow users to use custom images:
Next in line are:
feat(core): Added FastAPI module
feat(core): Added AWS Lambda module
Based on the work done on #585
Expended from issue #83