Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P platform-airflow-dags
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Gmodena
  • platform-airflow-dags
  • Merge requests
  • !6

Add tests for airflow dags

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Gmodena requested to merge T293382-dags-testing into multi-project-dags-repo Oct 28, 2021
  • Overview 0
  • Commits 3
  • Pipelines 2
  • Changes 5

This PR adds the capability to test Airflow DAG instances via pytest, as described in [SPIKE] Investigate Different CI Checks.

What changes with this PR

A new test suite for DAG integrity testing has been added.

Integrity testing

The tests/dags/test_dag_integrity.py suite performs validation of all DAG modules in the repo; it follows a recommended validation practice described in https://www.astronomer.io/guides/testing-airflow#dag-validation-testing: ensure that your DAG objects are defined correctly, acyclic, and free from import errors.

The suite can be triggered via: make test_dags.

Note: dags/ima.py contains side effects that cause the test to (correctly) fail. We should get rid of in e.g. T292740. We could xfails() or skip() the suite before merging.

Edited Nov 01, 2021 by Gmodena
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: T293382-dags-testing