Replies: 2 comments
|
For an internal provider repository with no production DAGs, I would keep two layers separate:
A provider test can therefore follow the same shape as the official provider tests: construct the DAG inside the test with For tests that must exercise a real executor, scheduler, or external service, use the provider's system/integration-test setup separately; |
|
For unit and integration testing in a standalone package or custom internal provider (where you maintain custom operators, hooks, and sensors without production DAGs), the recommended approach remains using the You do not need to migrate to Why
|
Uh oh!
There was an error while loading. Please reload this page.
If I'm building and distributing an internal Airflow provider, for example, a repository that only contains custom operators, hooks, etc., but no DAGs, what is the best way to write integration tests for that code? Official Airflow providers often use the dag_maker fixture as a convenient way to write unit tests (example) that create an in-memory DAG. However, the official documentation suggests
dag.test(), which requires a separate DAG file to exist in a configured DAG bundle. If the latter is the answer, will official Airflow providers be migrating to that approach as well?All reactions