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

DynamoDB: Improve software test about decoding a list with empty string #248

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/dynamodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
paths:
- '.github/workflows/dynamodb.yml'
- 'cratedb_toolkit/io/dynamodb/**'
- 'tests/io/dynamodb/**'
- 'pyproject.toml'
push:
branches: [ main ]
paths:
- '.github/workflows/dynamodb.yml'
- 'cratedb_toolkit/io/dynamodb/**'
- 'tests/io/dynamodb/**'
- 'pyproject.toml'

# Allow job to be triggered manually.
Expand Down
19 changes: 18 additions & 1 deletion tests/io/dynamodb/test_copy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import pytest

from cratedb_toolkit.io.dynamodb.copy import DynamoDBFullLoad

pytestmark = pytest.mark.dynamodb


RECORD_UTM = {
"Id": {"N": "101"},
"utmTags": {
Expand All @@ -15,10 +20,17 @@
}
]
},
"location": {
"M": {
"coordinates": {"L": [{"S": ""}]},
"meetingPoint": {"S": "At the end of the tunnel"},
"address": {"S": "Salzbergwerk Berchtesgaden"},
},
},
}


def test_dynamodb_copy_list_of_objects(caplog, cratedb, dynamodb, dynamodb_test_manager):
def test_dynamodb_copy(caplog, cratedb, dynamodb, dynamodb_test_manager):
"""
CLI test: Invoke `ctk load table` for DynamoDB.
"""
Expand Down Expand Up @@ -51,4 +63,9 @@ def test_dynamodb_copy_list_of_objects(caplog, cratedb, dynamodb, dynamodb_test_
"utm_source": "google",
}
],
"location": {
"coordinates": [""],
"meetingPoint": "At the end of the tunnel",
"address": "Salzbergwerk Berchtesgaden",
},
}