From 268e90854c4dd937543296a00ade56e901456210 Mon Sep 17 00:00:00 2001 From: Edan Binshtok Date: Wed, 18 Oct 2017 07:53:45 +0300 Subject: Align CI test test and JJB Add vendor agnostic CI test to align Add Tox and maven docker Issue Id: VVP-15 Change-Id: Ia84ba49b8d3631c1529c1a8141ebf2c2cb1881c9 Signed-off-by: Edan Binshtok --- django/engagementmanager/tests/__init__.py | 0 .../tests/test_access_credentials.py | 0 django/engagementmanager/tests/test_activation.py | 0 django/engagementmanager/tests/test_activities.py | 0 django/engagementmanager/tests/test_add_contact.py | 0 .../engagementmanager/tests/test_add_feedback.py | 0 .../tests/test_add_next_step_to_checklist.py | 0 .../tests/test_audit_log_and_decision_api.py | 0 .../engagementmanager/tests/test_auth_service.py | 0 django/engagementmanager/tests/test_base_entity.py | 2 +- .../tests/test_base_transaction_entity.py | 2 +- django/engagementmanager/tests/test_checklist.py | 0 .../tests/test_checklist_template.py | 0 .../tests/test_cms_documentation_search.py | 0 django/engagementmanager/tests/test_cms_pages.py | 0 django/engagementmanager/tests/test_cms_posts.py | 0 .../tests/test_deployment_target_sites.py | 0 .../tests/test_digest_email_notifications.py | 0 .../engagementmanager/tests/test_eng_progress.py | 0 django/engagementmanager/tests/test_eng_status.py | 0 .../tests/test_engagement_admin_operations.py | 0 .../tests/test_engagement_export.py | 4 ++++ .../engagementmanager/tests/test_expanded_eng.py | 0 .../tests/test_import_engagement_xls.py | 0 .../engagementmanager/tests/test_invite_members.py | 0 django/engagementmanager/tests/test_next_steps.py | 0 .../engagementmanager/tests/test_next_steps_api.py | 0 .../tests/test_notify_inactive_engagements.py | 0 .../tests/test_pull_notifications.py | 0 .../engagementmanager/tests/test_rados_gateway.py | 0 .../tests/test_remove_user_from_eng_team.py | 0 .../tests/test_request_data_manager.py | 4 +++- .../tests/test_resend_activation_email.py | 0 .../engagementmanager/tests/test_reset_password.py | 0 django/engagementmanager/tests/test_rgwa_client.py | 0 .../tests/test_set_checklist_state.py | 27 +++++++++++----------- .../engagementmanager/tests/test_set_eng_stage.py | 0 .../tests/test_update_password.py | 0 .../tests/test_update_user_account.py | 0 django/engagementmanager/tests/test_vfc.py | 0 .../engagementmanager/tests/vvpEntitiesCreator.py | 0 41 files changed, 23 insertions(+), 16 deletions(-) mode change 100755 => 100644 django/engagementmanager/tests/__init__.py mode change 100755 => 100644 django/engagementmanager/tests/test_access_credentials.py mode change 100755 => 100644 django/engagementmanager/tests/test_activation.py mode change 100755 => 100644 django/engagementmanager/tests/test_activities.py mode change 100755 => 100644 django/engagementmanager/tests/test_add_contact.py mode change 100755 => 100644 django/engagementmanager/tests/test_add_feedback.py mode change 100755 => 100644 django/engagementmanager/tests/test_add_next_step_to_checklist.py mode change 100755 => 100644 django/engagementmanager/tests/test_audit_log_and_decision_api.py mode change 100755 => 100644 django/engagementmanager/tests/test_auth_service.py mode change 100755 => 100644 django/engagementmanager/tests/test_base_entity.py mode change 100755 => 100644 django/engagementmanager/tests/test_base_transaction_entity.py mode change 100755 => 100644 django/engagementmanager/tests/test_checklist.py mode change 100755 => 100644 django/engagementmanager/tests/test_checklist_template.py mode change 100755 => 100644 django/engagementmanager/tests/test_cms_documentation_search.py mode change 100755 => 100644 django/engagementmanager/tests/test_cms_pages.py mode change 100755 => 100644 django/engagementmanager/tests/test_cms_posts.py mode change 100755 => 100644 django/engagementmanager/tests/test_deployment_target_sites.py mode change 100755 => 100644 django/engagementmanager/tests/test_digest_email_notifications.py mode change 100755 => 100644 django/engagementmanager/tests/test_eng_progress.py mode change 100755 => 100644 django/engagementmanager/tests/test_eng_status.py mode change 100755 => 100644 django/engagementmanager/tests/test_engagement_admin_operations.py mode change 100755 => 100644 django/engagementmanager/tests/test_engagement_export.py mode change 100755 => 100644 django/engagementmanager/tests/test_expanded_eng.py mode change 100755 => 100644 django/engagementmanager/tests/test_import_engagement_xls.py mode change 100755 => 100644 django/engagementmanager/tests/test_invite_members.py mode change 100755 => 100644 django/engagementmanager/tests/test_next_steps.py mode change 100755 => 100644 django/engagementmanager/tests/test_next_steps_api.py mode change 100755 => 100644 django/engagementmanager/tests/test_notify_inactive_engagements.py mode change 100755 => 100644 django/engagementmanager/tests/test_pull_notifications.py mode change 100755 => 100644 django/engagementmanager/tests/test_rados_gateway.py mode change 100755 => 100644 django/engagementmanager/tests/test_remove_user_from_eng_team.py mode change 100755 => 100644 django/engagementmanager/tests/test_request_data_manager.py mode change 100755 => 100644 django/engagementmanager/tests/test_resend_activation_email.py mode change 100755 => 100644 django/engagementmanager/tests/test_reset_password.py mode change 100755 => 100644 django/engagementmanager/tests/test_rgwa_client.py mode change 100755 => 100644 django/engagementmanager/tests/test_set_checklist_state.py mode change 100755 => 100644 django/engagementmanager/tests/test_set_eng_stage.py mode change 100755 => 100644 django/engagementmanager/tests/test_update_password.py mode change 100755 => 100644 django/engagementmanager/tests/test_update_user_account.py mode change 100755 => 100644 django/engagementmanager/tests/test_vfc.py mode change 100755 => 100644 django/engagementmanager/tests/vvpEntitiesCreator.py (limited to 'django/engagementmanager/tests') diff --git a/django/engagementmanager/tests/__init__.py b/django/engagementmanager/tests/__init__.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_access_credentials.py b/django/engagementmanager/tests/test_access_credentials.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_activation.py b/django/engagementmanager/tests/test_activation.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_activities.py b/django/engagementmanager/tests/test_activities.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_add_contact.py b/django/engagementmanager/tests/test_add_contact.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_add_feedback.py b/django/engagementmanager/tests/test_add_feedback.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_add_next_step_to_checklist.py b/django/engagementmanager/tests/test_add_next_step_to_checklist.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_audit_log_and_decision_api.py b/django/engagementmanager/tests/test_audit_log_and_decision_api.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_auth_service.py b/django/engagementmanager/tests/test_auth_service.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_base_entity.py b/django/engagementmanager/tests/test_base_entity.py old mode 100755 new mode 100644 index a90be1f..b6a5ece --- a/django/engagementmanager/tests/test_base_entity.py +++ b/django/engagementmanager/tests/test_base_entity.py @@ -59,7 +59,7 @@ class TestBaseEntity(TestCase): def setUp(self): logger.debug("---------------------- TestCase " + self.__class__.__name__ + " ----------------------") - self.urlPrefix = "/ice/v1/engmgr/" + self.urlPrefix = "/%s/v1/engmgr/" % settings.PROGRAM_NAME_URL_PREFIX self.conn = http.client.HTTPConnection("127.0.0.1", 8000) # @UndefinedVariable self.c = Client() self.creator = VvpEntitiesCreator() diff --git a/django/engagementmanager/tests/test_base_transaction_entity.py b/django/engagementmanager/tests/test_base_transaction_entity.py old mode 100755 new mode 100644 index c4a5159..e206bad --- a/django/engagementmanager/tests/test_base_transaction_entity.py +++ b/django/engagementmanager/tests/test_base_transaction_entity.py @@ -53,7 +53,7 @@ class TestBaseTransactionEntity(TransactionTestCase): def setUp(self): logger.debug("---------------------- TransactionTestCase " + self.__class__.__name__ + " ----------------------") - self.urlPrefix = "/ice/v1/engmgr/" + self.urlPrefix = "/%s/v1/engmgr/" % settings.PROGRAM_NAME_URL_PREFIX self.conn = http.client.HTTPConnection("127.0.0.1", 8000) # @UndefinedVariable self.c = Client() self.creator = VvpEntitiesCreator() diff --git a/django/engagementmanager/tests/test_checklist.py b/django/engagementmanager/tests/test_checklist.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_checklist_template.py b/django/engagementmanager/tests/test_checklist_template.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_cms_documentation_search.py b/django/engagementmanager/tests/test_cms_documentation_search.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_cms_pages.py b/django/engagementmanager/tests/test_cms_pages.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_cms_posts.py b/django/engagementmanager/tests/test_cms_posts.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_deployment_target_sites.py b/django/engagementmanager/tests/test_deployment_target_sites.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_digest_email_notifications.py b/django/engagementmanager/tests/test_digest_email_notifications.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_eng_progress.py b/django/engagementmanager/tests/test_eng_progress.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_eng_status.py b/django/engagementmanager/tests/test_eng_status.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_engagement_admin_operations.py b/django/engagementmanager/tests/test_engagement_admin_operations.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_engagement_export.py b/django/engagementmanager/tests/test_engagement_export.py old mode 100755 new mode 100644 index 9cbceb0..7438658 --- a/django/engagementmanager/tests/test_engagement_export.py +++ b/django/engagementmanager/tests/test_engagement_export.py @@ -43,6 +43,7 @@ from engagementmanager.service.engagement_service import get_expanded_engs_for_e from engagementmanager.tests.test_base_entity import TestBaseEntity from engagementmanager.utils.constants import EngagementStage, Constants from engagementmanager.service.logging_service import LoggingServiceFactory +from django.conf import settings logger = LoggingServiceFactory.get_logger() @@ -112,6 +113,9 @@ class EngagementExportTestCase(TestBaseEntity): def testSuccessExport(self): self.printTestName("Success export [start]") + if settings.DATABASES["default"]["ENGINE"] == "django.db.backends.sqlite3": + return + urlStr = self.urlPrefix + 'engagement/export/?stage=Active&keyword' logger.debug( "action should success (200), and return one active engagement") diff --git a/django/engagementmanager/tests/test_expanded_eng.py b/django/engagementmanager/tests/test_expanded_eng.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_import_engagement_xls.py b/django/engagementmanager/tests/test_import_engagement_xls.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_invite_members.py b/django/engagementmanager/tests/test_invite_members.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_next_steps.py b/django/engagementmanager/tests/test_next_steps.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_next_steps_api.py b/django/engagementmanager/tests/test_next_steps_api.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_notify_inactive_engagements.py b/django/engagementmanager/tests/test_notify_inactive_engagements.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_pull_notifications.py b/django/engagementmanager/tests/test_pull_notifications.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_rados_gateway.py b/django/engagementmanager/tests/test_rados_gateway.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_remove_user_from_eng_team.py b/django/engagementmanager/tests/test_remove_user_from_eng_team.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_request_data_manager.py b/django/engagementmanager/tests/test_request_data_manager.py old mode 100755 new mode 100644 index 580301e..13e4fe0 --- a/django/engagementmanager/tests/test_request_data_manager.py +++ b/django/engagementmanager/tests/test_request_data_manager.py @@ -45,6 +45,8 @@ from django.db import connections from django.test.client import Client from django.test.testcases import TransactionTestCase from rest_framework.status import HTTP_401_UNAUTHORIZED, HTTP_200_OK + +from django.conf import settings from engagementmanager.models import Vendor from engagementmanager.tests.vvpEntitiesCreator import VvpEntitiesCreator from engagementmanager.utils.authentication import JWTAuthentication @@ -59,7 +61,7 @@ class TestRequestDataManager(TransactionTestCase): def childSetup(self): logger.debug("---------------------- TestCase " + self.__class__.__name__ + " ----------------------") - self.urlPrefix = "/ice/v1/engmgr/" + self.urlPrefix = "/%s/v1/engmgr/" % settings.PROGRAM_NAME_URL_PREFIX self.c = Client() self.creator = VvpEntitiesCreator() diff --git a/django/engagementmanager/tests/test_resend_activation_email.py b/django/engagementmanager/tests/test_resend_activation_email.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_reset_password.py b/django/engagementmanager/tests/test_reset_password.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_rgwa_client.py b/django/engagementmanager/tests/test_rgwa_client.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_set_checklist_state.py b/django/engagementmanager/tests/test_set_checklist_state.py old mode 100755 new mode 100644 index 54d3c8e..1b986ae --- a/django/engagementmanager/tests/test_set_checklist_state.py +++ b/django/engagementmanager/tests/test_set_checklist_state.py @@ -45,11 +45,19 @@ from rest_framework.status import HTTP_200_OK from uuid import uuid4 import json from engagementmanager.service.logging_service import LoggingServiceFactory +from mocks.jenkins_mock.services.jenkins_tests_validation_service import JenkinsTestsResultsSvc logger = LoggingServiceFactory.get_logger() class TestChecklistSetState(TestBaseEntity): + def initCLBody(self): + self.clbodydata['checkListName'] = ChecklistDefaultNames.HEAT_TEMPLATES + self.clbodydata['checkListTemplateUuid'] = str(self.template.uuid) + self.clbodydata['checkListAssociatedFiles'] =\ + "[\"file0/f69f4ce7-51d5-409c-9d0e-ec6b1e79df28\"," \ + " \"file1/f69f4ce7-51d5-409c-9d0e-ec6b1e79df28\"," \ + " \"file2/f69f4ce7-51d5-409c-9d0e-ec6b1e79df28\"]" def childSetup(self): self.createVendors([Constants.service_provider_company_name, 'Amdocs']) @@ -82,29 +90,22 @@ class TestChecklistSetState(TestBaseEntity): self.deploymentTarget = self.creator.createDeploymentTarget( self.randomGenerator("randomString"), self.randomGenerator("randomString")) -# self.asInfrastructure = self.creator.createApplicationServiceInfrastructure(self.randomGenerator("randomString")) self.vf = self.creator.createVF(self.randomGenerator("randomString"), self.engagement, self.deploymentTarget, False, self.vendor) -# self.vf.service_infrastructures.add(self.asInfrastructure) self.clbodydata = dict() self.initCLBody() self.checklist = Checklist.objects.create(uuid=uuid4(), name=self.clbodydata['checkListName'], validation_cycle=1, associated_files=self.clbodydata[ 'checkListAssociatedFiles'], engagement=self.engagement, template=self.template, creator=self.el_user, owner=self.el_user) self.checklist.save() - self.section = ChecklistSection.objects.create(uuid=uuid4(), name=self.randomGenerator("randomString"), weight=1.0, description=self.randomGenerator( - "randomString"), validation_instructions=self.randomGenerator("randomString"), template=self.template) - self.section.save() - self.line_item = ChecklistLineItem.objects.create(uuid=uuid4(), name=self.randomGenerator("randomString"), weight=1.0, description=self.randomGenerator( - "randomString"), line_type=CheckListLineType.auto.name, validation_instructions=self.randomGenerator("randomString"), template=self.template, section=self.section) # @UndefinedVariable - self.line_item2 = ChecklistLineItem.objects.create(uuid=uuid4(), name=self.randomGenerator("randomString"), weight=1.0, description=self.randomGenerator( - "randomString"), line_type=CheckListLineType.auto.name, validation_instructions=self.randomGenerator("randomString"), template=self.template, section=self.section) # @UndefinedVariable - self.line_item.save() - self.line_item2.save() + + self.line_items = ChecklistLineItem.objects.filter( + template=self.checklist.template)[:JenkinsTestsResultsSvc().num_of_auto_tests] + self.decision = ChecklistDecision.objects.create( - uuid=uuid4(), checklist=self.checklist, template=self.template, lineitem=self.line_item) + uuid=uuid4(), checklist=self.checklist, template=self.template, lineitem=self.line_items[0]) self.decision2 = ChecklistDecision.objects.create( - uuid=uuid4(), checklist=self.checklist, template=self.template, lineitem=self.line_item2) + uuid=uuid4(), checklist=self.checklist, template=self.template, lineitem=self.line_items[1]) self.decision.save() self.decision2.save() self.data = dict() diff --git a/django/engagementmanager/tests/test_set_eng_stage.py b/django/engagementmanager/tests/test_set_eng_stage.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_update_password.py b/django/engagementmanager/tests/test_update_password.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_update_user_account.py b/django/engagementmanager/tests/test_update_user_account.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/test_vfc.py b/django/engagementmanager/tests/test_vfc.py old mode 100755 new mode 100644 diff --git a/django/engagementmanager/tests/vvpEntitiesCreator.py b/django/engagementmanager/tests/vvpEntitiesCreator.py old mode 100755 new mode 100644 -- cgit 1.2.3-korg