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 Sendgrid: increase unit test coverage at least 90% #16332

Merged
merged 6 commits into from
Sep 5, 2022

Conversation

lazebnyi
Copy link
Collaborator

@lazebnyi lazebnyi commented Sep 5, 2022

What

#16331

How

Added unit tests

Pre-merge Checklist

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • 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
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

@lazebnyi lazebnyi linked an issue Sep 5, 2022 that may be closed by this pull request
@github-actions github-actions bot added the area/connectors Connector related issues label Sep 5, 2022
@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Sep 5, 2022

/test connector=connectors/source-sendgrid

🕑 connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2993358696
❌ connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2993358696
🐛 https://gradle.com/s/rjatgyarzom6s

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 ERROR unit_tests/unit_test.py::test_read_records[Templates-https:/api.sendgrid.com/v3/templates-expected0]
	 ERROR unit_tests/unit_test.py::test_read_records[Lists-https:/api.sendgrid.com/v3/marketing/lists-expected1]
	 ERROR unit_tests/unit_test.py::test_read_records[Campaigns-https:/api.sendgrid.com/v3/marketing/campaigns-expected2]
	 ERROR unit_tests/unit_test.py::test_read_records[Contacts-https:/api.sendgrid.com/v3/marketing/contacts-expected3]
	 ERROR unit_tests/unit_test.py::test_read_records[Segments-https:/api.sendgrid.com/v3/marketing/segments-expected4]
	 ERROR unit_tests/unit_test.py::test_read_records[Blocks-https:/api.sendgrid.com/v3/suppression/blocks-expected5]
	 ERROR unit_tests/unit_test.py::test_read_records[SuppressionGroupMembers-https:/api.sendgrid.com/v3/asm/suppressions-expected6]
	 ERROR unit_tests/unit_test.py::test_read_records[SuppressionGroups-https:/api.sendgrid.com/v3/asm/groups-expected7]
	 ERROR unit_tests/unit_test.py::test_read_records[GlobalSuppressions-https:/api.sendgrid.com/v3/suppression/unsubscribes-expected8]
	 �[31m=================== �[32m6 passed�[0m, �[33m45 warnings�[0m, �[31m�[1m9 errors�[0m�[31m in 0.71s�[0m�[31m ===================�[0m

Copy link
Collaborator

@bazarnov bazarnov left a comment

Choose a reason for hiding this comment

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

@lazebnyi lazebnyi removed the request for review from davydov-d September 5, 2022 15:25
@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Sep 5, 2022

/test connector=connectors/source-sendgrid

🕑 connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2994449438
❌ connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2994449438
🐛 https://gradle.com/s/vwfcblkgbb3wc

Build Failed

Test summary info:

Could not find result summary

@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Sep 5, 2022

/test connector=connectors/source-sendgrid

🕑 connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2994611511
❌ connectors/source-sendgrid https://github.com/airbytehq/airbyte/actions/runs/2994611511
🐛 https://gradle.com/s/yvtcr72hplfag

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream campa...
======================== 1 failed, 28 passed in 58.60s =========================

@lazebnyi lazebnyi changed the title Source Sendgrid: increase unit test coverage at least 90% 🎉Source Sendgrid: increase unit test coverage at least 90% Sep 5, 2022
@lazebnyi lazebnyi temporarily deployed to more-secrets September 5, 2022 16:03 Inactive
@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Sep 5, 2022

/test connector=connectors/source-sendgrid

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

Name                          Stmts   Miss  Cover
-------------------------------------------------
source_sendgrid/__init__.py       2      0   100%
source_sendgrid/source.py        19      1    95%
source_sendgrid/streams.py      158     17    89%
-------------------------------------------------
TOTAL                           179     18    90%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          10      4    60%   15-18
	 source_acceptance_test/config.py                        83      6    93%   78-80, 84-86
	 source_acceptance_test/conftest.py                     164    164     0%   6-282
	 source_acceptance_test/plugin.py                        48     48     0%   6-104
	 source_acceptance_test/tests/test_core.py              329    111    66%   39, 50-58, 63-70, 74-75, 79-80, 164, 202-219, 228-236, 240-245, 251, 284-289, 327-334, 374-376, 379, 439-448, 477-478, 484, 487, 520-530, 543-568, 573-577
	 source_acceptance_test/tests/test_full_refresh.py       52      2    96%   34, 65
	 source_acceptance_test/tests/test_incremental.py       121     25    79%   21-23, 29-31, 36-43, 48-61, 208-216
	 source_acceptance_test/utils/asserts.py                 37      2    95%   57-58
	 source_acceptance_test/utils/common.py                  77     17    78%   15-16, 24-30, 47-54, 64, 67
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       110     48    56%   23-26, 32, 36, 39-64, 67-69, 72-74, 77-79, 82-84, 87-89, 92-110, 144-146
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%   30-31, 38, 41, 65-68, 96, 120, 190-192
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1322    463    65%

Build Passed

Test summary info:

All Passed

@lazebnyi lazebnyi temporarily deployed to more-secrets September 5, 2022 16:45 Inactive
@lazebnyi lazebnyi merged commit f182492 into master Sep 5, 2022
@lazebnyi lazebnyi deleted the lazebnyi/source-sendgrid-coverage-unittest branch September 5, 2022 16:59
robbinhan pushed a commit to robbinhan/airbyte that referenced this pull request Sep 29, 2022
…#16332)

* Added unit tests

* Updated test name

* Updated setup

* Fix requirements

* Updated release stage

* Updated expected_records
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
…#16332)

* Added unit tests

* Updated test name

* Updated setup

* Fix requirements

* Updated release stage

* Updated expected_records
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Sendgrid: increase unit test coverage at least 90%
4 participants