Skip to content

Commit

Permalink
fixup! Remove ssh hook inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Jan 14, 2025
1 parent 9728abb commit de1e407
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/dag_processing/test_dag_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,18 @@ def test_repo_url_starts_with_git_when_using_ssh_conn_id(self, mock_hook, repo_u
],
)
@mock.patch("airflow.dag_processing.bundles.git.Repo")
def test_view_url(self, mock_gitrepo, repo_url, expected_url):
def test_view_url(self, mock_gitrepo, repo_url, expected_url, session):
session.query(Connection).delete()
conn = Connection(
conn_id="git_default",
host=repo_url,
conn_type="git",
)
session.add(conn)
session.commit()
bundle = GitDagBundle(
name="test",
refresh_interval=300,
repo_url=repo_url,
tracking_ref="main",
)
view_url = bundle.view_url("0f0f0f")
Expand All @@ -465,7 +472,6 @@ def test_view_url_returns_none_when_no_version_in_view_url(self, mock_gitrepo):
bundle = GitDagBundle(
name="test",
refresh_interval=300,
repo_url="[email protected]:apache/airflow.git",
tracking_ref="main",
)
view_url = bundle.view_url(None)
Expand Down

0 comments on commit de1e407

Please sign in to comment.