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

ServerContainer adjustments #2

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

alexanderankin
Copy link

@alexanderankin alexanderankin commented Jun 16, 2024

some additional thoughts, maybe ServerContainer direction should be clarified - its for FastAPI/Lambda module - in the class's doc string.

Additionally I want to make DockerImage and image as string more interchangeable, not just in servercontainer but everywhere, similar to how python has os.PathLike we should have DockerImageName type which includes DockerImage and str - https://java.testcontainers.org/features/creating_images/

…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)
@alexanderankin
Copy link
Author

additionally, had to make httpx not optional as it was referenced in a doctest

@Tranquility2
Copy link
Owner

This is nice, I fully understand the needs to actually be using "DockerImage", my implementation was wrong to use the image file directly..
If I understand currently this is much more like in Java:

public GenericContainer dslContainer = new GenericContainer(
    new ImageFromDockerfile()
            .withFileFromString("folder/someFile.txt", "hello")

@Tranquility2 Tranquility2 merged commit 4b57208 into Tranquility2:srv_container Jun 17, 2024
0 of 2 checks passed
@alexanderankin alexanderankin deleted the srv_container branch September 24, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants