-
Notifications
You must be signed in to change notification settings - Fork 89
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-15198: Added best practices #116
Merged
+20
−16
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fcfaf21
added best practices
fc909d8
resolved pylint
498c620
test: run only pagination test
d196597
test: run only pagination test
ca11e98
test: run all tests
6b59b64
test: run all tests
c9808a8
test: run only paginaiton test
4a44518
test: updated variable page size setting
34239ba
run all the tests
4bbe151
made changes according to comments
aedbea8
Added integration test for start date and bookmark both are provided
savan-chovatiya d626909
Removed startdate&bookmark test as it's implicitly covered in bookmar…
savan-chovatiya 4d58f68
Merge branch 'master' into best-practices
hpatel41 922d536
Merge branch 'master' into best-practices
KrisPersonal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ orbs: | |
jobs: | ||
build: | ||
docker: | ||
- image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:tap-tester-v4 | ||
- image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:stitch-tap-tester | ||
steps: | ||
- checkout | ||
- run: | ||
|
@@ -32,13 +32,7 @@ jobs: | |
aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/tap_tester_sandbox dev_env.sh | ||
source dev_env.sh | ||
source /usr/local/share/virtualenvs/tap-tester/bin/activate | ||
run-test --tap=tap-shopify \ | ||
--target=target-stitch \ | ||
--orchestrator=stitch-orchestrator \ | ||
[email protected] \ | ||
--password=$SANDBOX_PASSWORD \ | ||
--client-id=50 \ | ||
tests | ||
run-test --tap=tap-shopify tests | ||
- slack/notify-on-failure: | ||
only_for_branches: master | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ def __init__(self, *args, **kwargs): | |
def name(self): | ||
return "tap_tester_shopify_pagination_test" | ||
|
||
def get_properties(self, *args, **kwargs): | ||
props = super().get_properties(*args, **kwargs) | ||
props['results_per_page'] = '50' | ||
return props | ||
|
||
def test_run(self): | ||
with self.subTest(store="store_1"): | ||
|
@@ -56,15 +60,18 @@ def pagination_test(self, conn_id, testable_streams): | |
record_count_by_stream = self.run_sync(conn_id) | ||
actual_fields_by_stream = runner.examine_target_output_for_fields() | ||
|
||
api_limit = int(self.get_properties().get('results_per_page', self.DEFAULT_RESULTS_PER_PAGE)) | ||
|
||
for stream in testable_streams: | ||
with self.subTest(stream=stream): | ||
|
||
# verify that we can paginate with all fields selected | ||
stream_metadata = self.expected_metadata().get(stream, {}) | ||
minimum_record_count = stream_metadata.get( | ||
self.API_LIMIT, | ||
self.get_properties().get('result_per_page', self.DEFAULT_RESULTS_PER_PAGE) | ||
) | ||
# minimum_record_count = stream_metadata.get( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove this commented code if not required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the commented code |
||
# self.API_LIMIT, | ||
# self.get_properties().get('result_per_page', self.DEFAULT_RESULTS_PER_PAGE) | ||
# ) | ||
minimum_record_count = 100 if stream == 'transactions' else api_limit | ||
self.assertGreater( | ||
record_count_by_stream.get(stream, -1), | ||
minimum_record_count, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we added this commented code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, removed the line