Added strategy ID + Action Plan syncing
In this changeset, I implemented the logic which cancels any audit or action plan whose goal has been re-synced (upon restarting the Decision Engine). Partially Implements: blueprint efficacy-indicator Change-Id: I95d2739eb552d4a7a02c822b11844591008f648e
This commit is contained in:
@@ -155,14 +155,14 @@ class TestPurgeCommand(base.DbTestCase):
|
||||
|
||||
with freezegun.freeze_time(self.expired_date):
|
||||
self.action_plan1 = obj_utils.create_test_action_plan(
|
||||
self.context, audit_id=self.audit1.id,
|
||||
id=self._generate_id(), uuid=None)
|
||||
self.context, id=self._generate_id(), uuid=None,
|
||||
audit_id=self.audit1.id, strategy_id=self.strategy1.id)
|
||||
self.action_plan2 = obj_utils.create_test_action_plan(
|
||||
self.context, audit_id=self.audit2.id,
|
||||
id=self._generate_id(), uuid=None)
|
||||
self.context, id=self._generate_id(), uuid=None,
|
||||
audit_id=self.audit2.id, strategy_id=self.strategy2.id)
|
||||
self.action_plan3 = obj_utils.create_test_action_plan(
|
||||
self.context, audit_id=self.audit3.id,
|
||||
id=self._generate_id(), uuid=None)
|
||||
self.context, id=self._generate_id(), uuid=None,
|
||||
audit_id=self.audit3.id, strategy_id=self.strategy3.id)
|
||||
|
||||
self.action1 = obj_utils.create_test_action(
|
||||
self.context, action_plan_id=self.action_plan1.id,
|
||||
|
||||
@@ -124,6 +124,7 @@ def get_test_action_plan(**kwargs):
|
||||
'uuid': kwargs.get('uuid', '76be87bd-3422-43f9-93a0-e85a577e3061'),
|
||||
'state': kwargs.get('state', 'ONGOING'),
|
||||
'audit_id': kwargs.get('audit_id', 1),
|
||||
'strategy_id': kwargs.get('strategy_id', 1),
|
||||
'global_efficacy': kwargs.get('global_efficacy', {}),
|
||||
'first_action_id': kwargs.get('first_action_id', 1),
|
||||
'created_at': kwargs.get('created_at'),
|
||||
|
||||
Reference in New Issue
Block a user