SIENTIAPDE-1150
SIENTIAPDE-1150: enhance MongoDB activities to filter successful pipelines; update orchestration workflow to include timestamp management for updated, created, and deleted pipelines; adjust tests to reflect new success criteria
This commit is contained in:
@@ -250,8 +250,8 @@ async def test_aggregate_documents_in_mongodb_missing_aggregation(mongo_db):
|
||||
@patch("orchestrator.activities.mongo_db.datetime")
|
||||
async def test_update_pipelines_timestamps_success(datetime_mock, mongo_db):
|
||||
input_data = {"updated_pipelines": [
|
||||
{"schedule_name": "test1", "namespace": "test1"},
|
||||
{"schedule_name": "test2", "namespace": "test2"}
|
||||
{"schedule_name": "test1", "namespace": "test1", "success": True},
|
||||
{"schedule_name": "test2", "namespace": "test2", "success": True}
|
||||
]}
|
||||
mongo_db.database["pipelines"].update_many.return_value = MagicMock()
|
||||
await mongo_db.update_pipelines_timestamps(input_data)
|
||||
@@ -269,8 +269,8 @@ async def test_update_pipelines_timestamps_success(datetime_mock, mongo_db):
|
||||
@patch("orchestrator.activities.mongo_db.datetime")
|
||||
async def test_create_pipelines_timestamps_success(datetime_mock, mongo_db):
|
||||
input_data = {"created_pipelines": [
|
||||
{"schedule_name": "test1", "namespace": "test1"},
|
||||
{"schedule_name": "test2", "namespace": "test2"}
|
||||
{"schedule_name": "test1", "namespace": "test1", "success": True},
|
||||
{"schedule_name": "test2", "namespace": "test2", "success": True}
|
||||
]}
|
||||
mongo_db.database["pipelines"].insert_many.return_value = MagicMock()
|
||||
await mongo_db.create_pipelines_timestamps(input_data)
|
||||
@@ -288,8 +288,8 @@ async def test_create_pipelines_timestamps_success(datetime_mock, mongo_db):
|
||||
@patch("orchestrator.activities.mongo_db.datetime")
|
||||
async def test_delete_pipelines_timestamps_success(datetime_mock, mongo_db):
|
||||
input_data = {"deleted_pipelines": [
|
||||
{"schedule_name": "test1", "namespace": "test1"},
|
||||
{"schedule_name": "test2", "namespace": "test2"}
|
||||
{"schedule_name": "test1", "namespace": "test1", "success": True},
|
||||
{"schedule_name": "test2", "namespace": "test2", "success": True}
|
||||
]}
|
||||
mongo_db.database["pipelines"].delete_many.return_value = MagicMock()
|
||||
await mongo_db.delete_pipelines_timestamps(input_data)
|
||||
|
||||
Reference in New Issue
Block a user