From 058b1a12b55329175513294e10d7a4ec11fdec21 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. 5.8.4 caught a regression ... with `OBJECT(IGNORED)` columns: They no longer accept `ARRAY`s of varying types. --- CHANGES.md | 4 ++++ tests/transform/conftest.py | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 443c09f..5eaa610 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,10 @@ # Changelog ## Unreleased +- MongoDB: Fixed BSON decoding of `{"$date": 1180690093000}` timestamps +- DynamoDB: Use CrateDB 5.8.3 for testing. 5.8.4 caught a regression with + `OBJECT(IGNORED)` columns: They no longer accept `ARRAY`s of varying + types. ## 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..466fd09 100644 --- a/tests/transform/conftest.py +++ b/tests/transform/conftest.py @@ -9,13 +9,26 @@ ] +@pytest.fixture(scope="session") +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_service): +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