-
Notifications
You must be signed in to change notification settings - Fork 297
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 Generic module #612
feat(core): Added Generic module #612
Conversation
Fix missing doc Fix missing httpx as optional dependency Refactored ServerContainer
I'll remove the extra commit `Test module import' once we feel the PR is ready |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #612 +/- ##
=======================================
Coverage ? 76.26%
=======================================
Files ? 11
Lines ? 573
Branches ? 83
=======================================
Hits ? 437
Misses ? 110
Partials ? 26 ☔ View full report in Codecov by Sentry. |
I actually really love the test module import, if it can be I kind of want to think about this some more before merging, as its a fairly major change. but one that I think make sense. i have to double check what we are doing with the httpx in the poetry files because afaik, you should not need to be adding it to the extras. we already depend on urllib3, we should just do the same to httpx, if we are doing to rely on it this heavily. |
I'll be happy to add |
8799049
to
30d3172
Compare
🤖 I have created a release *beep* *boop* --- ## [4.7.0](testcontainers-v4.6.0...testcontainers-v4.7.0) (2024-06-28) ### Features * **core:** Added Generic module ([#612](#612)) ([e575b28](e575b28)) * **core:** allow custom dockerfile path for image build and bypassing build cache ([#615](#615)) ([ead0f79](ead0f79)), closes [#610](#610) * **core:** DockerCompose.stop now stops only services that it starts (does not stop the other services) ([#620](#620)) ([e711800](e711800)) ### Bug Fixes * **ollama:** Add support for ollama module ([#618](#618)) ([5442d05](5442d05)) * **cosmosdb:** Add support for the CosmosDB Emulator ([#579](#579)) ([8045a80](8045a80)) * improve ollama docs, s/ollama_dir/ollama_home/g ([#619](#619)) ([27f2a6b](27f2a6b)) * **kafka:** Add Kraft to Kafka containers ([#611](#611)) ([762d2a2](762d2a2)) ### Documentation * **contributing:** add contribution and new-container guide ([#460](#460)) ([3519f4b](3519f4b)) --- 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>
Following #612, updated the test module import with a better name and some minor fixes.
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 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.