Skip to content

Commit

Permalink
Updating tests, registering mark
Browse files Browse the repository at this point in the history
  • Loading branch information
jroach-astronomer authored and pankajastro committed Oct 30, 2024
1 parent 3ffc6c5 commit 2bbe1ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion dev/dags/dags

This file was deleted.

21 changes: 10 additions & 11 deletions dev/dags/example_callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ example_callbacks:
default_args:
start_date: "2024-01-01"
on_failure_callback:
callback: customized.callbacks.custom_callbacks.output_message
param1: param1
param2: param2
callback: airflow.providers.slack.notifications.slack.send_slack_notification
slack_conn_id: slack_conn_id
text: |
:red_circle: Task Failed.
This task has failed and needs to be addressed.
Please remediate this issue ASAP.
channel: "#channel"
schedule_interval: "@daily"
catchup: False
on_failure_callback:
callback: airflow.providers.slack.notifications.slack.send_slack_notification
slack_conn_id: slack_conn_id
text: |
:red_circle: Task Failed.
This task has failed and needs to be addressed.
Please remediate this issue ASAP.
channel: "#channel"
username: username
callback: customized.callbacks.custom_callbacks.output_message
param1: param1
param2: param2
tasks:
start:
operator: airflow.operators.python.PythonOperator
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ universal = true
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]
minversion = "6.0"
markers = ["integration"]
markers = ["integration", "callbacks"]

######################################
# THIRD PARTY TOOLS
Expand Down
2 changes: 2 additions & 0 deletions tests/test_example_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def get_dag_bag() -> DagBag:
print(f"Adding {dagfile} to .airflowignore")
file.writelines([f"{dagfile}\n"])

# Print the contents of the .airflowignore file, and build the DagBag
print(".airflowignore contents: ")
print(AIRFLOW_IGNORE_FILE.read_text())
db = DagBag(EXAMPLE_DAGS_DIR, include_examples=False)

assert db.dags
assert not db.import_errors
return db
Expand Down

0 comments on commit 2bbe1ee

Please sign in to comment.