enable -1 voting in topoPortmapping and E2E tests 27/82527/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Mon, 17 Jun 2019 09:47:47 +0000 (11:47 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Mon, 17 Jun 2019 09:57:03 +0000 (11:57 +0200)
topoPortmapping and E2E include expected failures in some tests.
This change
 - adds a unittest.expectedFailure decorator to the tests unit expected
   to fail.
   This way the test suite will return success even if they fail.
 - enables topoPortmapping and E2E tests failure reports to Jenkins.

Change-Id: I679526af0afb01ba08b57a726ff137ff3431916d
JIRA: TRNSPRTPCE-129
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
tests/transportpce_tests/1.2.1/test_topoPortMapping.py
tests/transportpce_tests/2.2.1/test_end2end.py
tox.ini

index a772a9109bfa0e266beedb62f66094cd08c7d504..f941846ca5032461e9f8b36c3433aac3897f9fc5 100644 (file)
@@ -222,6 +222,7 @@ class TransportPCEtesting(unittest.TestCase):
          time.sleep(15)
 
     #Verify the termination points related to XPDR
          time.sleep(15)
 
     #Verify the termination points related to XPDR
+    @unittest.expectedFailure
     def test_05_compareOpenroadmTopologyPortMapping(self):
         nbXPDR=1
         for p in(1,nbXPDR+1):
     def test_05_compareOpenroadmTopologyPortMapping(self):
         nbXPDR=1
         for p in(1,nbXPDR+1):
index 6f0edf2870357911f6749f22654a42cf463d89ef..a5c9de321d5447936678793d76f1865939f74742 100644 (file)
@@ -1472,6 +1472,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         self.test_32_check_topo_ROADMA_SRG1()
         self.test_33_check_topo_ROADMA_DEG2()
 
         self.test_32_check_topo_ROADMA_SRG1()
         self.test_33_check_topo_ROADMA_DEG2()
 
+    @unittest.expectedFailure
     def test_47_loop_create_eth_service(self):
         for i in range(1,6):
             print ("trial number {}".format(i))
     def test_47_loop_create_eth_service(self):
         for i in range(1,6):
             print ("trial number {}".format(i))
@@ -1484,6 +1485,7 @@ class TransportPCEFulltesting(unittest.TestCase):
             print ("eth service deletion\n")
             self.test_28_delete_eth_service1()
 
             print ("eth service deletion\n")
             self.test_28_delete_eth_service1()
 
+    @unittest.expectedFailure
     def test_48_loop_create_oc_service(self):
         url = ("{}/operational/org-openroadm-service:service-list/services/service1"
                .format(self.restconf_baseurl))
     def test_48_loop_create_oc_service(self):
         url = ("{}/operational/org-openroadm-service:service-list/services/service1"
                .format(self.restconf_baseurl))
diff --git a/tox.ini b/tox.ini
index cb0addf4c83ff468c866fda34f9caadd38ae2e25..9bcaf4fb8c19479622fc85d3f1964d94464f40fc 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -20,7 +20,7 @@ commands =
   {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221}: - bash -c "(cd .. && mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true)"
   {py27,portmapping,topoPortMapping,rspn,topology,olm,end2end}: - ./buildHoneynode.sh
   {py27,portmapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py
   {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221}: - bash -c "(cd .. && mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true)"
   {py27,portmapping,topoPortMapping,rspn,topology,olm,end2end}: - ./buildHoneynode.sh
   {py27,portmapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py
-  {py27,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topoPortMapping.py
+  {py27,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topoPortMapping.py
   {py27,topology}: nosetests --with-xunit transportpce_tests/1.2.1/test_topology.py
   {py27,rspn}: nosetests --with-xunit transportpce_tests/1.2.1/test_renderer_service_path_nominal.py
   {py27,pce}: nosetests --with-xunit transportpce_tests/1.2.1/test_pce.py
   {py27,topology}: nosetests --with-xunit transportpce_tests/1.2.1/test_topology.py
   {py27,rspn}: nosetests --with-xunit transportpce_tests/1.2.1/test_renderer_service_path_nominal.py
   {py27,pce}: nosetests --with-xunit transportpce_tests/1.2.1/test_pce.py
@@ -31,7 +31,7 @@ commands =
   {py27,topology221}: nosetests --with-xunit transportpce_tests/2.2.1/test_topology.py
   {py27,rspn221}: nosetests --with-xunit transportpce_tests/2.2.1/test_renderer_service_path_nominal.py
   {py27,olm221}: nosetests --with-xunit transportpce_tests/2.2.1/test_olm.py
   {py27,topology221}: nosetests --with-xunit transportpce_tests/2.2.1/test_topology.py
   {py27,rspn221}: nosetests --with-xunit transportpce_tests/2.2.1/test_renderer_service_path_nominal.py
   {py27,olm221}: nosetests --with-xunit transportpce_tests/2.2.1/test_olm.py
-  {py27,end2end221}: nosetests --with-xunit transportpce_tests/2.2.1/test_end2end.py
+  {py27,end2end221}: nosetests --with-xunit transportpce_tests/2.2.1/test_end2end.py
 
 
 [testenv:docs]
 
 
 [testenv:docs]