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 14962 implement tap tester tests #53

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0cc64d2
Added new tep-tester test cases
prijendev Sep 10, 2021
305dfdc
Updated all_fields test case for track_events stream
prijendev Sep 13, 2021
eb4cb85
updated dev and test dependency for circleci
prijendev Sep 13, 2021
9285815
Updated start_date and added lookback_window assertion in bookmark test.
prijendev Sep 14, 2021
7978e80
Updated all_fields and automatic_fields test cases as per review comm…
prijendev Sep 15, 2021
d08f2c0
Updated as per review comments
prijendev Sep 30, 2021
45b22cb
revert back replicatio key change
prijendev Sep 30, 2021
7db0b87
Added back config file
prijendev Oct 4, 2021
939cfc3
Commented some part of code
prijendev Oct 13, 2021
751b2ef
Updated circleci config file
prijendev Oct 13, 2021
8fa6bf9
Removed f-string
savan-chovatiya Oct 18, 2021
5a547ef
Tdl 15671 full table sync record count (#60)
prijendev Oct 27, 2021
d182d23
Bug fix for using new bookmark for child streams (#61)
prijendev Oct 27, 2021
fcd1a19
Best practices (#62)
prijendev Oct 27, 2021
a3434e9
Error backoff (#63)
prijendev Oct 27, 2021
be58545
Tdl 14795 rmoved endpoints dict (#64)
prijendev Oct 27, 2021
30dd453
Tdl 6877 add backoff for conn reset error (#65)
prijendev Oct 27, 2021
09c14c8
Fix incremental streams as full table (#66)
prijendev Oct 27, 2021
1beac7f
Tdl 14950 correctly discover the custom fields (#67)
prijendev Oct 27, 2021
782b7bd
Tdl 14964 fix none type date parsing (#68)
prijendev Oct 27, 2021
e099234
Tdl 14945 fix sync of visitor stream (#69)
prijendev Oct 27, 2021
9dab3f1
Merge remote-tracking branch 'origin/TDL-15987-all-non-pk-changes' in…
prijendev Oct 27, 2021
87a577d
Changes updated
prijendev Oct 27, 2021
5ee8cb2
updated base file and bookmark test
prijendev Oct 27, 2021
5b04c0f
Updated bookmark test
prijendev Oct 27, 2021
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
27 changes: 16 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
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:
Expand All @@ -11,7 +11,7 @@ jobs:
python3 -mvenv /usr/local/share/virtualenvs/tap-pendo
source /usr/local/share/virtualenvs/tap-pendo/bin/activate
pip install -U pip setuptools
pip install .[dev]
pip install .[test]
Copy link
Contributor

Choose a reason for hiding this comment

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

@prijendev Does this indicate that we no more consider the modules added as part of the 'dev' list?

Copy link
Contributor Author

@prijendev prijendev Oct 11, 2021

Choose a reason for hiding this comment

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

Yes, because earlier circleci was failing due to ipdb dependency listed under 'dev' list. So, as per suggestion given in link split down 'dev' list dependency into 'test' and 'dev' list.

- run:
name: 'JSON Validator'
command: |
Expand All @@ -23,20 +23,25 @@ jobs:
source /usr/local/share/virtualenvs/tap-pendo/bin/activate
# TODO: Adjust the pylint disables
pylint tap_pendo --disable 'broad-except,chained-comparison,empty-docstring,fixme,invalid-name,line-too-long,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-raise,no-else-return,too-few-public-methods,too-many-arguments,too-many-branches,too-many-lines,too-many-locals,ungrouped-imports,wrong-spelling-in-comment,wrong-spelling-in-docstring,bad-whitespace,missing-class-docstring'
- run:
name: 'Unit Tests'
command: |
source /usr/local/share/virtualenvs/tap-pendo/bin/activate
pip install coverage
nosetests --with-coverage --cover-erase --cover-package=tap_pendo --cover-html-dir=htmlcov tests/unittests
coverage html
- store_test_results:
path: test_output/report.xml
- store_artifacts:
path: htmlcov
- add_ssh_keys
- run:
name: 'Integration Tests'
command: |
aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/sandbox dev_env.sh
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-pendo \
--target=target-stitch \
--orchestrator=stitch-orchestrator \
[email protected] \
--password=$SANDBOX_PASSWORD \
--client-id=50 \
tests/tap_tester
run-test --tap=tap-pendo tests/tap_tester
workflows:
version: 2
commit:
Expand All @@ -53,4 +58,4 @@ workflows:
- master
jobs:
- build:
context: circleci-user
context: circleci-user
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ Interrupted syncs for Event type stream are resumed via a bookmark placed during
- `x_pendo_integration_key` (string, `ABCdef123`): an integration key from Pendo.
- `period` (string, `ABCdef123`): `dayRange` or `hourRange`
- `lookback_window` (integer): 10 (For event objects. Default: 0)
- `request_timeout` (integer): 300 (For passing timeout to the request. Default: 300)

```json
{
"x_pendo_integration_key": "YOUR_INTEGRATION_KEY",
"start_date": "2020-09-18T00:00:00Z",
"period": "dayRange",
"lookback_window": 10,
"request_timeout": 300,
"include_anonymous_visitors: "true"
}
```
Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
classifiers=["Programming Language :: Python :: 3 :: Only"],
py_modules=["tap_pendo"],
install_requires=[
'singer-python==5.2.1',
'singer-python==5.12.2',
"requests",
'pyhumps==1.3.1',
'backoff==1.3.2',
'backoff==1.8.0',
'ijson==3.1.4',
],
extras_require={
'dev': [
'ipdb==0.11',
'test': [
'pylint==2.5.3',
'nose'
],
'dev': [
'ipdb==0.11'
]
},
entry_points="""
Expand Down
2 changes: 1 addition & 1 deletion tap_pendo/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def build_metadata_metadata(mdata, schema, custom_fields):
schema['properties']['custom'] = {}
schema['properties']['custom']['type'] = ["null", "object"]
schema['properties']['custom']['additional_properties'] = "false"
for key, _ in custom_fields.items():
schema['properties']['custom']['properties'] = {}
for key, _ in custom_fields.items():
schema['properties']['custom']['properties'][key] = {}
schema['properties']['custom']['properties'][key]['type'] = [
"null", "object"
Expand Down
Loading