Skip to content

Commit

Permalink
DynamoDB: Improve software test about decoding a list with empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 30, 2024
1 parent 2295b91 commit 2930432
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
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",
},
}

0 comments on commit 2930432

Please sign in to comment.