SIENTIAPDE-1110
Implement store_data_package method in Redis activity for debug data storage. Update CoreScouter workflow to conditionally call store_data_package based on debug flag. Enhance tests for store_data_package functionality and error handling.
This commit is contained in:
@@ -34,7 +34,8 @@ async def test_core_scouter_workflow_success(mock_workflow, core_scouter):
|
||||
'schema': 'test_schema',
|
||||
'table_name': 'test_table',
|
||||
'retention_time': 3600,
|
||||
'model_tags': {}
|
||||
'model_tags': {},
|
||||
'debug_data_package': True
|
||||
}
|
||||
)
|
||||
|
||||
@@ -98,6 +99,21 @@ async def test_core_scouter_workflow_success(mock_workflow, core_scouter):
|
||||
)
|
||||
])
|
||||
|
||||
mock_workflow.execute_activity_method.assert_has_calls([
|
||||
call(
|
||||
Activities.store_data_package,
|
||||
{
|
||||
**expected_metadata,
|
||||
'workflow_name': 'test_workflow',
|
||||
'schedule_name': 'test_schedule',
|
||||
'held_data': 'held_data',
|
||||
'data': 'test_data'
|
||||
},
|
||||
retry_policy=ANY,
|
||||
start_to_close_timeout=ANY
|
||||
)
|
||||
])
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@patch('scouter.workflow.sub_workflows.core_scouter.workflow', new_callable=AsyncMock)
|
||||
|
||||
Reference in New Issue
Block a user