Bug Fixes: remove Db name + path 59/34559/1
authorMorgan Richomme <morgan.richomme@orange.com>
Wed, 10 May 2017 13:47:24 +0000 (15:47 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Wed, 10 May 2017 13:49:27 +0000 (15:49 +0200)
as case have been renamed in testcases.yaml
no more need or translation name/Db name

Change-Id: I0656ec478369224d44d9c3cdf0c6426f140e4029
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
utils/test/reporting/docker/reporting.sh
utils/test/reporting/functest/reporting-status.py
utils/test/reporting/functest/template/index-status-tmpl.html
utils/test/reporting/functest/testCase.py

index 1de13ae..1b1e4a8 100755 (executable)
@@ -3,7 +3,7 @@
 export PYTHONPATH="${PYTHONPATH}:."
 export CONFIG_REPORTING_YAML=./reporting.yaml
 
-declare -a versions=(colorado master)
+declare -a versions=(danube master)
 declare -a projects=(functest storperf yardstick)
 
 project=$1
index 94e7f2f..e700e04 100755 (executable)
@@ -163,14 +163,13 @@ for version in versions:
                                       test_case.isRunnable))
                         time.sleep(1)
                         if test_case.isRunnable:
-                            dbName = test_case.getDbName()
                             name = test_case.getName()
                             displayName = test_case.getDisplayName()
                             project = test_case.getProject()
                             nb_test_runnable_for_this_scenario += 1
                             logger.info(" Searching results for case %s " %
                                         (displayName))
-                            result = rp_utils.getResult(dbName, installer,
+                            result = rp_utils.getResult(name, installer,
                                                         s, version)
                             # if no result set the value to 0
                             if result < 0:
@@ -197,13 +196,12 @@ for version in versions:
                                       test_case.isRunnable))
                         time.sleep(1)
                         if test_case.isRunnable:
-                            dbName = test_case.getDbName()
                             name = test_case.getName()
                             displayName = test_case.getDisplayName()
                             project = test_case.getProject()
                             logger.info(" Searching results for case %s " %
                                         (displayName))
-                            result = rp_utils.getResult(dbName, installer,
+                            result = rp_utils.getResult(name, installer,
                                                         s, version)
                             # at least 1 result for the test
                             if result > -1:
index ebacfd1..cc4edaa 100644 (file)
@@ -134,13 +134,13 @@ $(document).ready(function (){
                         <tr class="tr-weather-weather">
                             {% for test in items[scenario] -%}
                             {% if test.getCriteria() > 2 -%}
-                                <td><img src="../../../img/weather-clear.png"></td>
+                                <td><img src="../../img/weather-clear.png"></td>
                             {%- elif test.getCriteria() > 1 -%}
-                                <td><img src="../../../img/weather-few-clouds.png"></td>
+                                <td><img src="../../img/weather-few-clouds.png"></td>
                             {%- elif test.getCriteria() > 0 -%}
-                                <td><img src="../../../img/weather-overcast.png"></td>
+                                <td><img src="../../img/weather-overcast.png"></td>
                             {%- elif test.getCriteria() > -1 -%}
-                                <td><img src="../../../img/weather-storm.png"></td>
+                                <td><img src="../../img/weather-storm.png"></td>
                             {%- endif %}
                             {%- endfor %}
                         </tr>
index c89e619..9834f07 100644 (file)
@@ -33,27 +33,29 @@ class TestCase(object):
                                'bgpvpn': 'bgpvpn',
                                'rally_full': 'Rally (full)',
                                'vims': 'vIMS',
-                               'doctor': 'Doctor',
+                               'doctor-notification': 'Doctor',
                                'promise': 'Promise',
                                'moon': 'Moon',
                                'copper': 'Copper',
                                'security_scan': 'Security',
                                'multisite': 'Multisite',
-                               'domino': 'Domino',
-                               'odl-sfc': 'SFC',
+                               'domino-multinode': 'Domino',
+                               'functest-odl-sfc': 'SFC',
                                'onos_sfc': 'SFC',
-                               'parser': 'Parser',
+                               'parser-basics': 'Parser',
                                'connection_check': 'Health (connection)',
                                'api_check': 'Health (api)',
                                'snaps_smoke': 'SNAPS',
                                'snaps_health_check': 'Health (dhcp)',
-                               'netready': 'Netready',
+                               'gluon_vping': 'Netready',
                                'fds': 'FDS',
                                'cloudify_ims': 'vIMS (Cloudify)',
                                'orchestra_ims': 'OpenIMS (OpenBaton)',
                                'opera_ims': 'vIMS (Open-O)',
                                'vyos_vrouter': 'vyos',
-                               'barometer': 'Barometer'}
+                               'barometercollectd': 'Barometer',
+                               'odl_netvirt': 'Netvirt',
+                               'security_scan': 'Security'}
         try:
             self.displayName = display_name_matrix[self.name]
         except:
@@ -119,50 +121,5 @@ class TestCase(object):
                     ";IsRunnable" + str(self.isRunnable))
         return testcase
 
-    def getDbName(self):
-        # Correspondance name of the test case / name in the DB
-        # ideally we should modify the DB to avoid such interface....
-        # '<name in the config>':'<name in the DB>'
-        # I know it is uggly...
-        test_match_matrix = {'healthcheck': 'healthcheck',
-                             'vping_ssh': 'vping_ssh',
-                             'vping_userdata': 'vping_userdata',
-                             'odl': 'odl',
-                             'onos': 'onos',
-                             'ocl': 'ocl',
-                             'tempest_smoke_serial': 'tempest_smoke_serial',
-                             'tempest_full_parallel': 'tempest_full_parallel',
-                             'tempest_defcore': 'tempest_defcore',
-                             'refstack_defcore': 'refstack_defcore',
-                             'rally_sanity': 'rally_sanity',
-                             'bgpvpn': 'bgpvpn',
-                             'rally_full': 'rally_full',
-                             'vims': 'vims',
-                             'doctor': 'doctor-notification',
-                             'promise': 'promise',
-                             'moon': 'moon_authentication',
-                             'copper': 'copper-notification',
-                             'security_scan': 'security',
-                             'multisite': 'multisite',
-                             'domino': 'domino-multinode',
-                             'odl-sfc': 'functest-odl-sfc',
-                             'onos_sfc': 'onos_sfc',
-                             'parser': 'parser-basics',
-                             'connection_check': 'connection_check',
-                             'api_check': 'api_check',
-                             'snaps_smoke': 'snaps_smoke',
-                             'snaps_health_check': 'snaps_health_check',
-                             'netready': 'gluon_vping',
-                             'fds': 'fds',
-                             'cloudify_ims': 'cloudify_ims',
-                             'orchestra_ims': 'orchestra_ims',
-                             'opera_ims': 'opera_ims',
-                             'vyos_vrouter': 'vyos_vrouter',
-                             'barometer': 'barometercollectd'}
-        try:
-            return test_match_matrix[self.name]
-        except:
-            return "unknown"
-
     def getDisplayName(self):
         return self.displayName