Skip to content

Tests: Start crate from testcontainers instead of cratedb-toolkit - #321

Open
florinutz wants to merge 1 commit into
mainfrom
flo/320/testcontainers-upstream
Open

florinutz wants to merge 1 commit into
mainfrom
flo/320/testcontainers-upstream

Conversation

@florinutz

@florinutz florinutz commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

sqlalchemy-cratedb's tests start crate through cratedb-toolkit, and the toolkit depends on sqlalchemy-cratedb, so a change here can break the suite until both packages release (#320, crate/cratedb-toolkit#913).

The cratedb_service fixture now starts crate from the CrateDBContainer class of testcontainers, through a small CrateDBTestAdapter in tests/util.py. It holds the engine and the SQL helpers used by the tests (run_sql, refresh_table, count_records), so the test extra installs testcontainers>=4.15,<5 and httpx instead of cratedb-toolkit[testing]. The extra lists those two rather than testcontainers[cratedb], because that extra also installs sqlalchemy-cratedb from PyPI. The tests would then depend on a released copy of this package again.

The fixture runs the crate version from CRATEDB_VERSION (nightly by default). Nightly comes from crate/crate:nightly, and a released version comes from the official crate:<version> image, because the release tags of crate/crate are amd64-only.

Closes #320.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a227245f-2916-46c0-a3f8-aee7f2638674

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@florinutz
florinutz marked this pull request as ready for review October 9, 2026 17:23
@florinutz
florinutz requested a review from bgunebakan October 9, 2026 17:23
@florinutz florinutz self-assigned this Oct 9, 2026
@florinutz
florinutz force-pushed the flo/320/testcontainers-upstream branch from a21ca56 to 1dbc038 Compare October 9, 2026 18:49
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.

Tests depend on cratedb-toolkit, which depends on this package

1 participant