Delete the reachability tests 41/28541/1 stable/colorado
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 26 Oct 2016 07:41:19 +0000 (09:41 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Feb 2017 17:34:00 +0000 (18:34 +0100)
It removes 001__reachability.robot as it is now part of OpenDaylight
integration/test. It completes the commit which pushes upstream the
reachability tests [1].

[1] https://git.opendaylight.org/gerrit/#/c/46910/

Conflicts:
      testcases/Controllers/ODL/OpenDaylightTesting.py
      unit_tests/odl/test_odl.py

Change-Id: I72926cd4ab77e12ba4aeabf03bdd35619d43ffd3
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit d3042a7aa885d7761289661fb728f4d7b5e7c94b)

testcases/Controllers/ODL/OpenDaylightTesting.py
testcases/Controllers/ODL/custom_tests/neutron/001__reachability.robot [deleted file]

index 35a2ee1..40871ee 100755 (executable)
@@ -4,7 +4,6 @@ import argparse
 import fileinput
 import os
 import re
-import shutil
 import sys
 import urlparse
 
@@ -48,19 +47,6 @@ class ODLTestCases:
     res_dir = '/home/opnfv/functest/results/odl/'
     logger = ft_logger.Logger("opendaylight").getLogger()
 
-    @classmethod
-    def copy_opnf_testcases(cls):
-        opnfv_testcases_dir = (os.path.dirname(os.path.abspath(__file__)) +
-                               "/custom_tests/neutron/")
-        file = opnfv_testcases_dir + "001__reachability.robot"
-        try:
-            shutil.copy(file, cls.neutron_suite_dir)
-        except IOError as e:
-            cls.logger.error(
-                "Cannot copy OPNFV's testcase to ODL directory: %s" % str(e))
-            return False
-        return True
-
     @classmethod
     def set_robotframework_vars(cls, odlusername="admin", odlpassword="admin"):
         odl_variables_files = cls.odl_test_repo + 'csit/variables/Variables.py'
@@ -94,8 +80,7 @@ class ODLTestCases:
             cls.logger.error("Cannot run ODL testcases. Please check "
                              "%s" % str(e))
             return False
-        if (cls.copy_opnf_testcases() and
-                cls.set_robotframework_vars(odlusername, odlpassword)):
+        if cls.set_robotframework_vars(odlusername, odlpassword):
             try:
                 os.makedirs(cls.res_dir)
             except OSError:
diff --git a/testcases/Controllers/ODL/custom_tests/neutron/001__reachability.robot b/testcases/Controllers/ODL/custom_tests/neutron/001__reachability.robot
deleted file mode 100644 (file)
index c2714c6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-*** Variables ***
-${NeutronNorthbound}    /controller/nb/v2/neutron
-${NetworkNorthbound}    ${NeutronNorthbound}/networks
-${SubnetNorthbound}     ${NeutronNorthbound}/subnets
-${PortNorthbound}       ${NeutronNorthbound}/ports
-
-*** Settings ***
-Suite Setup       Create Session    ODL    http://${ODL_SYSTEM_IP}:${PORT}    headers=${HEADERS}    auth=${AUTH}
-Suite Teardown    Delete All Sessions
-Library           RequestsLibrary
-Variables         ../../../variables/Variables.py
-
-*** Test Cases ***
-Get the complete list of networks
-    [Documentation]    Get the complete list of networks
-    [Tags]    reachability
-    ${resp}   get request    ODL    ${NetworkNorthbound}
-    Should be Equal As Strings    ${resp.status_code}    200
-
-Get the complete list of subnets
-    [Documentation]    Get the complete list of subnets
-    [Tags]    reachability
-    ${resp}   get request    ODL    ${SubnetNorthbound}
-    Should be Equal As Strings    ${resp.status_code}    200
-
-Get the complete list of ports
-    [Documentation]    Get the complete list of ports
-    [Tags]    reachability
-    ${resp}   get request    ODL    ${PortNorthbound}
-    Should be Equal As Strings    ${resp.status_code}    200