SIENTIAPDE-1174

SIENTIAPDE-1174
chore: update sientia-dataops-library dependency version from 1.3.7 to 1.3.8 in requirements.txt

- Removed unused test group from test_formatters.py.
- Added new test case for handling scenarios with no log reports in test_alerts.py.
- Added new test case for handling scenarios with no groups in test_reports.py.
This commit is contained in:
vitor-aignosi
2025-08-05 13:51:34 -03:00
parent bc81555ad0
commit afaf017340
4 changed files with 37 additions and 7 deletions

View File

@@ -5,5 +5,5 @@ redis
couchbase couchbase
pymongo pymongo
jinja2 jinja2
git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.3.7 git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.3.8
prometheus-client prometheus-client

View File

@@ -816,10 +816,5 @@ async def test_filter_notification_reports(formatters):
'notification_id': 'test_notification_id_3' 'notification_id': 'test_notification_id_3'
} }
] ]
},
'test_group_2': {
'group_name': 'test_group_2',
'contents': ['core_alerts'],
'notifications': []
} }
} }

View File

@@ -1,4 +1,4 @@
from unittest.mock import AsyncMock, patch, ANY, call from unittest.mock import AsyncMock, MagicMock, patch, ANY, call
from pytest import fixture, mark from pytest import fixture, mark
from orchestrator.workflows.alerts import Alerts from orchestrator.workflows.alerts import Alerts
from orchestrator.activities.activities import Activities from orchestrator.activities.activities import Activities
@@ -115,3 +115,22 @@ async def test_run_no_data(workflow_mock, alerts):
]) ])
workflow_mock.execute_local_activity_method.assert_not_called() workflow_mock.execute_local_activity_method.assert_not_called()
@mark.asyncio
@patch("orchestrator.workflows.alerts.workflow", new_callable=AsyncMock)
async def test_run_no_log_report(workflow_mock, alerts):
workflow_mock.execute_child_workflow.side_effect = [
MagicMock(),
[]
]
input_data = {
'schedule_name': 'test-schedule-name',
'notification_ttl': 300,
'sent_ttl': 600
}
await alerts.run(input_data)
workflow_mock.execute_activity_method.assert_not_called()

View File

@@ -97,3 +97,19 @@ async def test_run_no_data(workflow_mock, reports):
]) ])
workflow_mock.execute_local_activity_method.assert_not_called() workflow_mock.execute_local_activity_method.assert_not_called()
@mark.asyncio
@patch("orchestrator.workflows.reports.workflow", new_callable=AsyncMock)
async def test_run_no_groups(workflow_mock, reports):
workflow_mock.execute_local_activity_method.return_value = []
input_data = {
'schedule_name': 'test-schedule-name',
'notification_ttl': 300,
'sent_ttl': 600
}
await reports.run(input_data)
workflow_mock.execute_child_workflow.assert_called_once()