Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,6 @@ async def is_keys_unchanged_async(
"FAILURE: Inactivity Period passed, not enough objects found in %s",
path,
)
return {
"status": "error",
"message": f"FAILURE: Inactivity Period passed, not enough objects found in {path}",
}
return {
"status": "pending",
"previous_objects": previous_objects,
Expand Down
10 changes: 4 additions & 6 deletions providers/amazon/tests/unit/amazon/aws/hooks/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,10 @@ async def test_s3_key_hook_is_keys_unchanged_async_handle_tzinfo(self, mock_list

@pytest.mark.asyncio
@async_mock.patch("airflow.providers.amazon.aws.triggers.s3.S3Hook._list_keys_async")
async def test_s3_key_hook_is_keys_unchanged_inactivity_error_async(self, mock_list_keys):
async def test_s3_key_hook_is_keys_unchanged_inactivity_async(self, mock_list_keys):
"""
Test is_key_unchanged gives AirflowException.
Test is_key_unchanged gives False response when the key value is unchanged in specified period
and not enough objects found.
"""
mock_list_keys.return_value = []

Expand All @@ -934,10 +935,7 @@ async def test_s3_key_hook_is_keys_unchanged_inactivity_error_async(self, mock_l
last_activity_time=None,
)

assert response == {
"status": "error",
"message": "FAILURE: Inactivity Period passed, not enough objects found in test_bucket/test",
}
assert response.get("status") == "pending"

@pytest.mark.asyncio
@async_mock.patch("airflow.providers.amazon.aws.triggers.s3.S3Hook._list_keys_async")
Expand Down