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

Tdl 20357 add missing tap tester tests #53

Open
wants to merge 25 commits into
base: crest-master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
25aabda
initial commit
NevilParikh14 Aug 24, 2022
3beaf78
Updated test cases
NevilParikh14 Aug 25, 2022
4d98589
added contacts stream in base.py
NevilParikh14 Aug 25, 2022
55e9e53
updated bookmark test cases
NevilParikh14 Aug 25, 2022
378ad79
Removed unused line
NevilParikh14 Aug 26, 2022
2286d1f
updated bookmark with filter param test case
NevilParikh14 Aug 26, 2022
e1aafd9
updated all fileds test case
NevilParikh14 Aug 26, 2022
ba6395b
Updated to LOGGER from print
NevilParikh14 Aug 29, 2022
010217d
Updated assertion message
NevilParikh14 Aug 29, 2022
f2313b8
added back commented print statement
NevilParikh14 Aug 29, 2022
5fc93e0
resolved review comments
NevilParikh14 Aug 29, 2022
3ecf64b
Updated pagination test case
NevilParikh14 Aug 29, 2022
5c3ccd5
uncommented LOGGERS
NevilParikh14 Aug 29, 2022
0c1ba1f
resolved review comments
NevilParikh14 Aug 31, 2022
f8202ef
removed unused imports
NevilParikh14 Sep 2, 2022
76be7cc
resolved review comments
NevilParikh14 Sep 5, 2022
6dc4ee8
resolved review comments
NevilParikh14 Sep 8, 2022
73afe0c
updated param name of expected_streams
NevilParikh14 Sep 12, 2022
35e3d16
removed unused import
NevilParikh14 Sep 15, 2022
422ec12
added tap-tester test for parent-child syncing
NevilParikh14 Sep 16, 2022
957e4b9
updated parent-child sync file
NevilParikh14 Sep 19, 2022
33180fb
updated pagination test case
NevilParikh14 Sep 19, 2022
2d777e5
updated bookmark with filter param test
NevilParikh14 Sep 20, 2022
013772e
resolved review comments
NevilParikh14 Sep 23, 2022
a215fb0
resolved review comments
NevilParikh14 Sep 27, 2022
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
7 changes: 4 additions & 3 deletions tests/test_freshdesk_parent_child_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def run_test(self, new_state, stream_to_test, minimum_bookmark, maximum_bookmark
# Verify that the minimum bookmark is used for selected parent-child stream.
replication_key_value = self.dt_to_ts(
record.get(replication_key), self.BOOKMARK_FORMAT)


# Verify that the records replicated for the selected streams are >= given bookmark.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Verify that the records replicated for the selected streams are >= given bookmark.
# Verify that the records replicated for the selected streams are greater than or equal to the given bookmark.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated comment as per suggestion.

self.assertGreaterEqual(
dbshah1212 marked this conversation as resolved.
Show resolved Hide resolved
replication_key_value, sync_start_date_ts,
msg="Sync records do not respect the provided bookmark."
Expand All @@ -115,14 +116,14 @@ def run_test(self, new_state, stream_to_test, minimum_bookmark, maximum_bookmark
self.assertGreater(sync_record_count.get(stream, 0), 0)

if stream in stream_to_test:
maximum_bookmark_value_ts = self.dt_to_ts(minimum_bookmark, self.BOOKMARK_FORMAT)
minimum_bookmark_value_ts = self.dt_to_ts(minimum_bookmark, self.BOOKMARK_FORMAT)
maximum_bookmark_value_ts = self.dt_to_ts(maximum_bookmark, self.BOOKMARK_FORMAT)
records_between_dates = []
for record in sync_messages:
replication_key_value = self.dt_to_ts(record.get(replication_key), self.BOOKMARK_FORMAT)

if minimum_bookmark_value_ts <= replication_key_value <= maximum_bookmark_value_ts:
records_between_dates.append(record)

# Verify that records between the bookmark values are replicated.
# Verify that records between the bookmark values are replicated for streams in streams to test.
self.assertIsNotNone(records_between_dates)