| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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:
|
Sorry, something went wrong.
Codecov ReportAttention: Patch coverage is 90.00000% with 4 lines in your changes missing coverage. Please review.
@@ 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. |
Sorry, something went wrong.
|
Yes, you are right, ServerContainer is a much better name and it correlates to your second point, I do think its very general and more in par with DBContainer than a specific module (thats why I placed it under generics). I think the modules should remain specific product related. I'll try and support my claim with the java implementation of "nginx container" (which I'll probably add later on 😅 ) https://github.com/testcontainers/testcontainers-java/blob/6658a2c0a880d01c6d402ea9a4cb5f72eb15083c/modules/nginx/src/main/java/org/testcontainers/containers/NginxContainer.java#L12C13-L12C29 So to conclude I think we should keep ServerContainer under generics, and maybe plan in the future to merge DBContainer and ServerContainer (?) into GenericContainer (but to be honest I think the separation is good at this stage) |
Sorry, something went wrong.
|
for context, we are trying to remove DbContainer as well. will take a look. |
Sorry, something went wrong.
|
I can offer another alternative, completely skip ServerContainer and just make the modules repeat some code, I can also check it out and propose a draft if you like. (with ServerContainer I tried to create something useful, maybe I just missed the big picture / context) |
Sorry, something went wrong.
…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 |
Sorry, something went wrong.
🤖 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".  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
| Back | FazBrowse Home | New Git URL |
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