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

🎉 Source Amplitude: increase unit_tests coverage up to 90% #12479

Merged
merged 4 commits into from
May 4, 2022

Conversation

bazarnov
Copy link
Collaborator

What

Resolving: #12432

How

  • added test_api.py to cover api module
  • added test_source.py to cover source module

🚨 User Impact 🚨

No impact expected.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here

@bazarnov bazarnov self-assigned this Apr 29, 2022
@github-actions github-actions bot added the area/connectors Connector related issues label Apr 29, 2022
@bazarnov bazarnov linked an issue Apr 29, 2022 that may be closed by this pull request
@bazarnov
Copy link
Collaborator Author

bazarnov commented Apr 29, 2022

/test connector=connectors/source-amplitude

🕑 connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2247571345
❌ connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2247571345
🐛 https://gradle.com/s/6nospbcsp7i7s

@bazarnov
Copy link
Collaborator Author

bazarnov commented Apr 29, 2022

/test connector=connectors/source-amplitude

🕑 connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2247619692
✅ connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2247619692
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        74      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/tests/test_core.py              285    106    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
source_acceptance_test/tests/test_incremental.py        69     38    45%
------------------------------------------------------------------------
TOTAL                                                  896    259    71%
Name                           Stmts   Miss  Cover
--------------------------------------------------
source_amplitude/__init__.py       2      0   100%
source_amplitude/source.py        24      2    92%
source_amplitude/errors.py        12      1    92%
source_amplitude/api.py          147     16    89%
--------------------------------------------------
TOTAL                            185     19    90%

Python short test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:21: `future_state_path` not specified, skipping
======================== 21 passed, 1 skipped in 53.64s ========================

@bazarnov bazarnov changed the title added unit_tests 🎉 Source Amplitude: increase unit_tests coverage up to 90% Apr 29, 2022
@bazarnov
Copy link
Collaborator Author

bazarnov commented May 2, 2022

/test connector=connectors/source-amplitude

🕑 connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2260055671
✅ connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2260055671
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        74      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/tests/test_core.py              285    106    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
source_acceptance_test/tests/test_incremental.py        69     38    45%
------------------------------------------------------------------------
TOTAL                                                  896    259    71%
Name                           Stmts   Miss  Cover
--------------------------------------------------
source_amplitude/source.py        24      0   100%
source_amplitude/__init__.py       2      0   100%
source_amplitude/errors.py        12      1    92%
source_amplitude/api.py          147     16    89%
--------------------------------------------------
TOTAL                            185     17    91%

Python short test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:21: `future_state_path` not specified, skipping
======================== 21 passed, 1 skipped in 57.92s ========================

@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@fd4b71e). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 70ee047 differs from pull request most recent head ee85ea5. Consider uploading reports for the commit ee85ea5 to get more accurate results

@@            Coverage Diff            @@
##             master   #12479   +/-   ##
=========================================
  Coverage          ?   90.81%           
=========================================
  Files             ?        4           
  Lines             ?      185           
  Branches          ?        0           
=========================================
  Hits              ?      168           
  Misses            ?       17           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd4b71e...ee85ea5. Read the comment docs.

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label May 4, 2022
@bazarnov bazarnov merged commit b61f790 into master May 4, 2022
@bazarnov bazarnov deleted the bazarnov/source-amplitude-increase-test-cov branch May 4, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/amplitude testing/unit_tests type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🎉 Source Amplitude: Increase unit_test coverage up to 90%
2 participants