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

Testing: Generalize KeepaliveContainer from CrateDBContainer #78

Merged
merged 2 commits into from
Nov 12, 2023

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 12, 2023

About

Add generalized KeepaliveContainer for efficient use of Testcontainers. It will give all containers the ability to honor TC_KEEPALIVE=true, i.e. not shutting down the container after running the test suite. This significantly improves cycle speed.

Details

This generalization to the Testcontainers infrastructure is needed to bring in two subsequent patches, because both will rely on it.

Because both will use this very code to run their test cases, I will not bother to add dedicated test cases for the infrastructure code.

Copy link

codecov bot commented Nov 12, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Files Coverage Δ
cratedb_toolkit/testing/testcontainers/cratedb.py 100.00% <100.00%> (+7.69%) ⬆️
cratedb_toolkit/testing/testcontainers/util.py 67.92% <63.82%> (-32.08%) ⬇️

📢 Thoughts on this report? Let us know!

@amotl amotl requested review from seut and matriv November 12, 2023 16:51
@amotl amotl marked this pull request as ready for review November 12, 2023 16:51
Comment on lines 58 to 59
# TODO: Use `crate/crate:nightly` by default?
image: str = "crate:latest",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do it, to always use the most recent code for testing all downstream applications, in order to be able to discover regressions early.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented with 1c49f92.

@amotl amotl force-pushed the amo/generalize-testcontainers branch from 9ab1a20 to 725fd28 Compare November 12, 2023 17:52
@amotl amotl force-pushed the amo/generalize-testcontainers branch from 725fd28 to 1c49f92 Compare November 12, 2023 17:54
@amotl amotl merged commit 7b2cd12 into main Nov 12, 2023
@amotl amotl deleted the amo/generalize-testcontainers branch November 12, 2023 17:56
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.

1 participant