Skip to content

Commit

Permalink
Add dag test
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Jul 22, 2024
1 parent ea775fe commit 9384c7c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test_kube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ jobs:
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v1
- name: Run setup
run: sh ./scripts/test/kubernetes-test.sh
run: |
sh ./scripts/test/kubernetes-test.sh
sh ./scripts/test/integration-kube.sh
6 changes: 6 additions & 0 deletions scripts/test/integration-kube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -x
set -e

pytest tests/test_example_dags.py::test_example_dag_k8s
10 changes: 10 additions & 0 deletions tests/test_example_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ def get_dag_ids() -> list[str]:
@pytest.mark.integration
@pytest.mark.parametrize("dag_id", get_dag_ids())
def test_example_dag(session, dag_id: str):
if dag_id == "jaffle_shop_kubernetes":
return
dag_bag = get_dag_bag()
dag = dag_bag.get_dag(dag_id)
test_utils.run_dag(dag)


@pytest.mark.integration
def test_example_dag_k8s(session):
dag_bag = get_dag_bag()
dag_id = "jaffle_shop_kubernetes"
dag = dag_bag.get_dag(dag_id)
test_utils.run_dag(dag)

0 comments on commit 9384c7c

Please sign in to comment.