This is an automated email from the ASF dual-hosted git repository.
amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8ac00cf8924 Stubbing missing tests for asset events and asset
operations (#58805)
8ac00cf8924 is described below
commit 8ac00cf8924d121f1ed5e9c497026274edb1c8e1
Author: Amogh Desai <[email protected]>
AuthorDate: Fri Nov 28 12:37:33 2025 +0530
Stubbing missing tests for asset events and asset operations (#58805)
---
.../task_sdk_tests/test_asset_event_operations.py | 28 +++++++++++++++++++++-
.../tests/task_sdk_tests/test_asset_operations.py | 28 +++++++++++++++++++++-
2 files changed, 54 insertions(+), 2 deletions(-)
diff --git
a/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_event_operations.py
b/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_event_operations.py
index e02e569149d..c1c43708428 100644
---
a/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_event_operations.py
+++
b/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_event_operations.py
@@ -18,11 +18,13 @@
Integration tests for Asset Event operations.
These tests validate the Execution API endpoints for Asset Event operations:
-- get(): Get asset events by name or URI
+- get(): Get asset events by name, URI, or alias
"""
from __future__ import annotations
+import pytest
+
from airflow.sdk.api.datamodels._generated import AssetEventsResponse
from task_sdk_tests import console
@@ -64,3 +66,27 @@ def test_asset_event_get_not_found(sdk_client_for_assets):
assert isinstance(response, AssetEventsResponse)
assert len(response.asset_events) == 0, "Expected empty list for
non-existent asset"
console.print("[green]✅ Asset event get (not found) test passed!")
+
+
[email protected](reason="TODO: Implement Asset Event get_by_uri test")
+def test_asset_event_get_by_uri(sdk_client_for_assets, asset_test_setup):
+ """
+ Test getting asset events by URI.
+
+ Expected: AssetEventsResponse with events
+ Endpoint: GET /execution/asset-events/by-asset?uri={uri}
+ """
+ console.print("[yellow]TODO: Implement test_asset_event_get_by_uri")
+ raise NotImplementedError("test_asset_event_get_by_uri not implemented")
+
+
[email protected](reason="TODO: Implement Asset Event get_by_alias test")
+def test_asset_event_get_by_alias(sdk_client_for_assets):
+ """
+ Test getting asset events by alias name.
+
+ Expected: AssetEventsResponse with events
+ Endpoint: GET /execution/asset-events/by-asset-alias?name={alias_name}
+ """
+ console.print("[yellow]TODO: Implement test_asset_event_get_by_alias")
+ raise NotImplementedError("test_asset_event_get_by_alias not implemented")
diff --git
a/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_operations.py
b/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_operations.py
index 528b1993bc9..9e3a65e165c 100644
--- a/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_operations.py
+++ b/task-sdk-integration-tests/tests/task_sdk_tests/test_asset_operations.py
@@ -19,11 +19,13 @@
Integration tests for Asset operations.
These tests validate the Execution API endpoints for Asset operations:
-- get(): Get asset by name
+- get(): Get asset by name or URI
"""
from __future__ import annotations
+import pytest
+
from airflow.sdk.api.datamodels._generated import AssetResponse
from airflow.sdk.execution_time.comms import ErrorResponse
from task_sdk_tests import console
@@ -63,3 +65,27 @@ def test_asset_get_by_name_not_found(sdk_client_for_assets):
assert isinstance(response, ErrorResponse)
assert str(response.error).endswith("ASSET_NOT_FOUND")
console.print("[green]Asset get by name (not found) test passed!")
+
+
[email protected](reason="TODO: Implement Asset get_by_uri test")
+def test_asset_get_by_uri(sdk_client_for_assets, asset_test_setup):
+ """
+ Test getting asset by URI.
+
+ Expected: AssetResponse with asset details
+ Endpoint: GET /execution/assets/by-uri?uri={uri}
+ """
+ console.print("[yellow]TODO: Implement test_asset_get_by_uri")
+ raise NotImplementedError("test_asset_get_by_uri not implemented")
+
+
[email protected](reason="TODO: Implement Asset get_by_uri (not found) test")
+def test_asset_get_by_uri_not_found(sdk_client_for_assets):
+ """
+ Test getting non-existent asset by URI.
+
+ Expected: ErrorResponse with ASSET_NOT_FOUND error
+ Endpoint: GET /execution/assets/by-uri?uri={uri}
+ """
+ console.print("[yellow]TODO: Implement test_asset_get_by_uri_not_found")
+ raise NotImplementedError("test_asset_get_by_uri_not_found not
implemented")