forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: wip #2
Open
mbenabda
wants to merge
37
commits into
main
Choose a base branch
from
pr/cosmosdb_emulator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: wip #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ner release of the emulator
…he MongoDB testcontainer
Just a .gitattributes file to checkout .sh files with LF line ending for people coming from Windows world. --------- Co-authored-by: David Ankin <[email protected]>
…ature (DOCKER_AUTH_CONFIG) (testcontainers#582) Follow up on testcontainers#566 - Testing using the registry module
…rts, and tests are run concurrently for several python versions)
With the option to import keycloak realms, introduced with testcontainers#565, the[_configure()](https://github.com/testcontainers/testcontainers-python/blob/78b6f0ecb15e8cba687eb4588c5ce19ca32208bc/modules/keycloak/testcontainers/keycloak/__init__.py#L57) method is called twice. Once it is called in the [start()](https://github.com/testcontainers/testcontainers-python/blob/78b6f0ecb15e8cba687eb4588c5ce19ca32208bc/modules/keycloak/testcontainers/keycloak/__init__.py#L83) method of keycloak itself and then it is called a second time in the [start()](https://github.com/testcontainers/testcontainers-python/blob/78b6f0ecb15e8cba687eb4588c5ce19ca32208bc/core/testcontainers/core/container.py#L90) method of DockerContainer. This wasn't an issue so far. But if a realm shall be imported (self.has_realm_import in keycloak is True), then every time the string " --import-realm" is added to the start command in the _configure() method. The keycloak container won't start if "--import-realm" is specified multiple times. This is probably the easiest solution to solve the issue. If wished, I can also work on a more robust solution, e.g. by storing the start command in a list and checking that "--import-realm" is only added once. Co-authored-by: Sebastian Scholz <[email protected]>
…void "unable to apply cgroup configuration" (testcontainers#592) relates to testcontainers#591
🤖 I have created a release *beep* *boop* --- ## [4.5.1](testcontainers/testcontainers-python@testcontainers-v4.5.0...testcontainers-v4.5.1) (2024-05-31) ### Bug Fixes * **k3s:** add configuration parameter for disabling cgroup mount to avoid "unable to apply cgroup configuration" ([testcontainers#592](testcontainers#592)) ([8917772](testcontainers@8917772)) * **keycloak:** realm import ([testcontainers#584](testcontainers#584)) ([111bd09](testcontainers@111bd09)) --- 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 testcontainers#559 (Providing the implementation for testcontainers#83 - Docker file support and more) This is the first PR (out of 4) that should provide all the groundwork to support image build. This would allow users to use custom images: ```python with DockerImage(path=".") as image: with DockerContainer(str(image)) as container: # Test something with/on custom image ``` Next in line is: `feat(core): Added SrvContainer` And later on: `feat(core): Added FastAPI module` `feat(core): Added AWS Lambda module` (all of the above can be overviewed on testcontainers#559)
Following testcontainers#566 - Private registry, adding the relevant doc so the usage will be clear and (hopefully) reachable.
Make the Readme display some more details regarding the project: - using ruff (just a nice reference) - pypi version (good visibility) - license (good visibility) - supported python versions (good visibility) - code coverage reporting (main driver for this PR) ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/1e8897b6-15eb-47eb-a1e7-42caa7db1eca) Relates to testcontainers#544 - export code coverage (e.g. to codecov)
Fix some issues with the private registry instructions: - issue with the link to official documentation - convert all relevant blocks to code-block - fix some typos
I use this wonderful package for writing tests, but I did not find a container for [Milvus vector database](https://milvus.io/docs) Please check, I'm ready to correct comments --------- Co-authored-by: ivan <[email protected]> Co-authored-by: David Ankin <[email protected]>
…ainers#599) This PR is adding a new MosquittoContainer class that helps creating integration tests for MQTT clients. The MosquittoContainer class contains a bunch of methods to help with testing: * checking number of messages received * watching topics * check last payload published on a particular topic * etc This PR lacks tests. I can add them if there is interest in this PR... --------- Co-authored-by: Dave Ankin <[email protected]>
As part of the effort described, detailed and presented on testcontainers#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: ```python with DockerImage(path=".", tag="test:latest") as image: with ServerContainer(port=9000, image=image) as srv: # Test something with/on the server using port 9000 ``` Next in line are: `feat(core): Added FastAPI module` `feat(core): Added AWS Lambda module` --- Based on the work done on testcontainers#585 Expended from issue testcontainers#83 --------- Co-authored-by: David Ankin <[email protected]>
Adds [Cockroach DB] (https://www.cockroachlabs.com/) module to use with Test containers I had done this previously under testcontainers#281, but opted to just redo it rather than try to rebase all the things. - [x] Create a new feature directory and populate it with the package structure [described in the documentation](https://testcontainers-python.readthedocs.io/en/latest/#package-structure). Copying one of the existing features is likely the best way to get started. - [x] Implement the new feature (typically in `__init__.py`) and corresponding tests. - [x] Update the feature `README.rst` and add it to the table of contents (`toctree` directive) in the top-level `README.rst`. - [] Add a line `[feature name]` to the list of components in the GitHub Action workflow in `.github/workflows/main.yml` to run tests, build, and publish your package when pushed to the `main` branch. - [x] Rebase your development branch on `main` (or merge `main` into your development branch). - [x] Add Package to pyproject.toml - [ ] Add a line `-e file:[feature name]` to `requirements.in` and open a pull request. Opening a pull request will automatically generate lock files to ensure reproducible builds (see the [pip-tools documentation](https://pip-tools.readthedocs.io/en/latest/) for details). Finally, run `python get_requirements.py --pr=[your PR number]` to fetch the updated requirement files (the build needs to have succeeded). --------- Co-authored-by: joelhess <[email protected]> Co-authored-by: David Ankin <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [4.6.0](testcontainers/testcontainers-python@testcontainers-v4.5.1...testcontainers-v4.6.0) (2024-06-18) ### Features * **core:** Added ServerContainer ([testcontainers#595](testcontainers#595)) ([0768490](testcontainers@0768490)) * **core:** Image build (Dockerfile support) ([testcontainers#585](testcontainers#585)) ([54c88cf](testcontainers@54c88cf)) ### Bug Fixes * Add Cockroach DB Module to Testcontainers ([testcontainers#608](testcontainers#608)) ([4aff679](testcontainers@4aff679)) * Container for Milvus database ([testcontainers#606](testcontainers#606)) ([ec76df2](testcontainers@ec76df2)) * move TESTCONTAINERS_HOST_OVERRIDE to config.py ([testcontainers#603](testcontainers#603)) ([2a5a190](testcontainers@2a5a190)), closes [testcontainers#602](testcontainers#602) * **mqtt:** Add mqtt.MosquittoContainer ([testcontainers#568](testcontainers#568)) ([testcontainers#599](testcontainers#599)) ([59cb6fc](testcontainers@59cb6fc)) ### Documentation * **main:** Private registry ([testcontainers#598](testcontainers#598)) ([9045c0a](testcontainers@9045c0a)) * Update private registry instructions ([testcontainers#604](testcontainers#604)) ([f5a019b](testcontainers@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>
Following a similar strategy as several other testcontainers implementations, this PR introduces the possibility to run Kafka in KRAft mode. ```py with KafkaContainer().with_kraft() as container: # Test something with/on KRaft mode ```
- Added a new class OllamaContainer with few methods to handle the Ollama container. - The `_check_and_add_gpu_capabilities` method checks if the host has GPUs and adds the necessary capabilities to the container. - The `commit_to_image` allows to save somehow the state of a container into an image so that we can reuse it, especially for the ones having some models pulled. - Added tests to check the functionality of the new class. > Note: I inspired myself from the java implementation of the Ollama module. Fixes testcontainers#617 --------- Co-authored-by: David Ankin <[email protected]>
… (does not stop the other services) (testcontainers#620) The command would otherwise stop/down all services, not just the services the instance itself started. Useful for e.g. one fixture per service, and you want different scopes for the services.
…tainers#460) # change Document how to contribute, with initial focus on making local development smooth. # Tasks - [x] Finish the `new-container` guide - [x] Remove any old docs referring to - [x] Update `README.md` to point at the contribution guide - [x] Update `README.md` to add badges (supported python versions, etc) and to give kudos to current and past maintainers and contributors --------- Co-authored-by: Dave Ankin <[email protected]> Co-authored-by: Jan Katins <[email protected]> Co-authored-by: Max Pfeiffer <[email protected]>
alexanderankin
force-pushed
the
pr/cosmosdb_emulator
branch
from
June 28, 2024 08:32
a85a9b6
to
fd04554
Compare
As part of the effort described, detailed and presented on testcontainers#559 This is the third PR (out of 4) that should provide all the groundwork to support containers running a server. As discussed on testcontainers#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 testcontainers#595 Next in line is ```feat(core): Added AWS Lambda module``` Based on the work done on testcontainers#585 and testcontainers#595 Expended from issue testcontainers#83 --- Please note an extra commit is included to simulate the relations when importing between and with other modules.
alexanderankin
force-pushed
the
pr/cosmosdb_emulator
branch
2 times, most recently
from
June 28, 2024 08:46
6fc5b9a
to
c90b36f
Compare
alexanderankin
force-pushed
the
pr/cosmosdb_emulator
branch
from
June 28, 2024 08:53
8541879
to
d57fbcc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.