-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Conversation
Change-Id: Ie1c4064ad99b40ef641089a1a9f3f358b758d7ca
Change-Id: I41fb01a969202bdef50f6c178569f1547062da21
Change-Id: I24b78bc91c1df61458091900c8d21f7dd0d727a8
e2d9ebb
to
98c88eb
Compare
'ads_to_gcs', | ||
} | ||
def print_sorted(container: Set, indent: str = " ") -> None: | ||
sorted_container = sorted(container) |
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.
Indeed. Sorting is important for predictability!
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. |
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:
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.