Skip to content

Commit

Permalink
DynamoDB: Use CrateDB 5.8.3 for testing. 5.8.4 caught a regression with
Browse files Browse the repository at this point in the history
`OBJECT(IGNORED)` columns: They no longer accept `ARRAY`s of varying
types.
  • Loading branch information
amotl committed Oct 9, 2024
1 parent 865b733 commit 82c08ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 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
Expand Down
20 changes: 17 additions & 3 deletions tests/transform/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Generator

import pytest
from cratedb_toolkit.testing.testcontainers.cratedb import CrateDBTestAdapter

from commons_codec.transform.dynamodb import DynamoDBCDCTranslator, DynamoDBFullLoadTranslator
from commons_codec.transform.dynamodb_model import PrimaryKeySchema
Expand All @@ -9,13 +12,24 @@
]


@pytest.fixture(scope="session")
def cratedb_custom_service() -> Generator[CrateDBTestAdapter, None, None]:
"""
Provide a CrateDB service instance to the test suite.
"""
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
Expand Down

0 comments on commit 82c08ca

Please sign in to comment.