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

Tests for provider code structure #23351

Merged
merged 3 commits into from
May 8, 2022
Merged

Conversation

bhirsz
Copy link
Contributor

@bhirsz bhirsz commented Apr 29, 2022

We had test class in test_project_structure.py that checked coverage of system tests/examples (and other misc stuff in provider code structure). Unfortunately there were some bugs (not all operators were found, some tests always passed, the test class worked only for Google).

I have refactored the tests in the test_project_structure.py so it could be reused by other providers. For Google we're now using two test class bases:

ExampleCoverageTest
AssetsCoverageTest

See the docker and elasticsearch providers test class (that uses ExampleCoverageTest base) to see how those test bases can be used or optionally extended with custom behaviour.

Bartlomiej Hirsz added 2 commits April 28, 2022 17:51
Change-Id: Ie1c4064ad99b40ef641089a1a9f3f358b758d7ca
Change-Id: I41fb01a969202bdef50f6c178569f1547062da21
tests/always/test_project_structure.py Outdated Show resolved Hide resolved
tests/always/test_project_structure.py Outdated Show resolved Hide resolved
tests/always/test_project_structure.py Outdated Show resolved Hide resolved
tests/always/test_project_structure.py Outdated Show resolved Hide resolved
Change-Id: I24b78bc91c1df61458091900c8d21f7dd0d727a8
'ads_to_gcs',
}
def print_sorted(container: Set, indent: str = " ") -> None:
sorted_container = sorted(container)
Copy link
Member

Choose a reason for hiding this comment

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

Indeed. Sorting is important for predictability!

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label May 8, 2022
@github-actions
Copy link

github-actions bot commented May 8, 2022

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants