From 73200827f2282a6203eb16c6145d7c15322eb0f0 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 9 Oct 2024 08:06:31 +0200 Subject: [PATCH] DynamoDB: Use CrateDB 5.8.3 for testing ... because 5.8.4 can no longer store `ARRAY`s with varying inner types into `OBJECT(IGNORED)` columns. --- CHANGES.md | 3 +++ tests/transform/conftest.py | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 443c09f..26fd86f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,9 @@ # Changelog ## Unreleased +- MongoDB: Fixed BSON decoding of `{"$date": 1180690093000}` timestamps +- DynamoDB: Use CrateDB 5.8.3 for testing because 5.8.4 can no longer + store `ARRAY`s with varying inner types into `OBJECT(IGNORED)` columns. ## 2024/09/30 v0.0.20 - DynamoDB: Change CrateDB data model to use (`pk`, `data`, `aux`) columns diff --git a/tests/transform/conftest.py b/tests/transform/conftest.py index 8c33e84..b20e215 100644 --- a/tests/transform/conftest.py +++ b/tests/transform/conftest.py @@ -10,12 +10,25 @@ @pytest.fixture(scope="function") -def cratedb(cratedb_service): +def cratedb_custom_service(): + """ + Provide a CrateDB service instance to the test suite. + """ + from cratedb_toolkit.testing.testcontainers.cratedb import CrateDBTestAdapter + + db = CrateDBTestAdapter(crate_version="5.8.3") + db.start() + yield db + db.stop() + + +@pytest.fixture(scope="function") +def cratedb(cratedb_custom_service): """ Provide a fresh canvas to each test case invocation, by resetting database content. """ - cratedb_service.reset(tables=RESET_TABLES) - yield cratedb_service + cratedb_custom_service.reset(tables=RESET_TABLES) + yield cratedb_custom_service @pytest.fixture