Skip to content

Commit

Permalink
Add built-in test
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 21, 2024
1 parent 42d8fd0 commit 3fe8ed0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions singer_sdk/testing/target_test_streams/pk_updates.singer
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{"type": "SCHEMA", "stream": "example_stream", "schema": {"properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "email": {"type": "string"}}, "key_properties": ["id"]}}
{"type": "RECORD", "stream": "example_stream", "record": {"id": 1, "name": "Alice", "email": "alice@example.com"}}
{"type": "SCHEMA", "stream": "example_stream", "schema": {"properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "email": {"type": "string"}}, "key_properties": ["email"]}}
{"type": "RECORD", "stream": "example_stream", "record": {"id": 2, "name": "Bob", "email": "bob@example.com"}}
6 changes: 6 additions & 0 deletions singer_sdk/testing/target_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ class TargetSchemaUpdates(TargetFileTestTemplate):
name = "schema_updates"


class TargetPrimaryKeyUpdates(TargetFileTestTemplate):
"""Test Target handles Primary Key updates."""

name = "pk_updates"


class TargetSpecialCharsInAttributes(TargetFileTestTemplate):
"""Test Target handles special chars in attributes."""

Expand Down

0 comments on commit 3fe8ed0

Please sign in to comment.