Skip to content

Commit

Permalink
Add test for setting replication key
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardWez committed Nov 23, 2023
1 parent e7668c0 commit 5c41aa8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_elx/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,11 @@ def test_catalog_valid_replication_keys(tap: Tap):

# Checks that value of `valid-replication-keys` equals to the replication-key
assert replication_keys == [DEFAULT_CATALOG["streams"][1]["replication_key"]]


def test_catalog_set_stream_replication_key(tap: Tap):
"""If we define a replication key, the catalog should be updated."""
catalog = tap.catalog

assert catalog.streams[1].replication_method == "INCREMENTAL"
assert catalog.streams[1].replication_key == "updated_at"

0 comments on commit 5c41aa8

Please sign in to comment.