aboutsummaryrefslogtreecommitdiffstats
path: root/services/api/api_checklist.py
diff options
context:
space:
mode:
authorEdan Binshtok <eb578m@intl.att.com>2017-10-18 07:56:58 +0300
committerEdan Binshtok <eb578m@intl.att.com>2017-10-18 07:56:58 +0300
commit433a8256e31f755f5e236491bbe39d3db24d6d6d (patch)
tree45f483eab1ea1654ee21a3b51c5b8bf1a8ebaffa /services/api/api_checklist.py
parentf8907f0c4fc0ba4bb97a1d636a50c5b40c2642f2 (diff)
Align CI test test and JJB
Add vendor agnostic CI test to align Add Tox and maven docker Issue Id: VVP-15 Change-Id: I69f0c1036e6f72b62bddc822544c55200af7b37d Signed-off-by: Edan Binshtok <eb578m@intl.att.com>
Diffstat (limited to 'services/api/api_checklist.py')
-rw-r--r--services/api/api_checklist.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/services/api/api_checklist.py b/services/api/api_checklist.py
index ef7b8a3..fda0730 100644
--- a/services/api/api_checklist.py
+++ b/services/api/api_checklist.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -47,6 +47,7 @@ from services.constants import Constants
from services.database.db_general import DBGeneral
from services.helper import Helper
from services.logging_service import LoggingServiceFactory
+from services.database.db_checklist import DBChecklist
logger = LoggingServiceFactory.get_logger()
@@ -208,12 +209,21 @@ class APIChecklist:
@staticmethod
def move_cl_to_closed(cl_uuid, vf_staff_emails):
api_checklist_obj = APIChecklist()
-
+ states = [Constants.ChecklistStates.PeerReview.TEXT,
+ Constants.ChecklistStates.Approval.TEXT,
+ Constants.ChecklistStates.Handoff.TEXT,
+ Constants.ChecklistStates.Closed.TEXT]
for i in range(len(vf_staff_emails)):
- logger.debug("Trying to jump state for %s [%s]" % (vf_staff_emails[i], i))
+ logger.debug(
+ "Trying to jump state for %s [%s]" % (vf_staff_emails[i], i))
+ DBChecklist.update_all_decisions_to_approve(cl_uuid)
api_checklist_obj.jump_state(cl_uuid, vf_staff_emails[i])
+ logger.debug("Checking state changed to %s" % states[i])
+ DBChecklist.state_changed("uuid", cl_uuid, states[i])
# Move CL to closed state.
- logger.debug("Trying to jump state 'closed' for %s" % vf_staff_emails[0])
+ logger.debug("Trying to jump state 'closed' for %s" %
+ vf_staff_emails[0])
api_checklist_obj.jump_state(cl_uuid, vf_staff_emails[0])
-
+ logger.debug("Checking state changed to %s" % states[-1])
+ DBChecklist.state_changed("uuid", cl_uuid, states[-1])