diff options
Diffstat (limited to 'functest/ci')
-rwxr-xr-x | functest/ci/check_os.sh | 6 | ||||
-rwxr-xr-x | functest/ci/exec_test.sh | 4 | ||||
-rw-r--r-- | functest/ci/logging.json | 58 | ||||
-rwxr-xr-x | functest/ci/prepare_env.py | 9 | ||||
-rwxr-xr-x | functest/ci/run_tests.py | 6 | ||||
-rwxr-xr-x | functest/ci/testcases.yaml | 4 |
6 files changed, 54 insertions, 33 deletions
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh index e2471026..b875a173 100755 --- a/functest/ci/check_os.sh +++ b/functest/ci/check_os.sh @@ -57,11 +57,11 @@ echo " ...OK" echo "Checking OpenStack basic services:" -commands=('openstack endpoint list' 'nova list' 'neutron net-list' \ - 'glance image-list' 'cinder list') +commands=('openstack endpoint list' 'openstack server list' 'openstack network list' \ + 'openstack image list' 'openstack volume list') for cmd in "${commands[@]}" do - service=$(echo $cmd | awk '{print $1}') + service=$(echo $cmd | awk '{print $1, $2}') echo ">>Checking $service service..." $cmd &>/dev/null result=$? diff --git a/functest/ci/exec_test.sh b/functest/ci/exec_test.sh index b288fe36..6a2b55a2 100755 --- a/functest/ci/exec_test.sh +++ b/functest/ci/exec_test.sh @@ -54,6 +54,10 @@ function odl_tests(){ odl_ip=$SDN_CONTROLLER_IP odl_port=8081 odl_restport=8081 + elif [ "$INSTALLER_TYPE" == "netvirt" ]; then + odl_ip=$SDN_CONTROLLER_IP + odl_port=8081 + odl_restport=8081 elif [ "$INSTALLER_TYPE" == "joid" ]; then odl_ip=$SDN_CONTROLLER elif [ "$INSTALLER_TYPE" == "compass" ]; then diff --git a/functest/ci/logging.json b/functest/ci/logging.json index 3f454e8f..2a2399d3 100644 --- a/functest/ci/logging.json +++ b/functest/ci/logging.json @@ -1,29 +1,29 @@ -{
- "version": 1,
- "disable_existing_loggers": false,
- "formatters": {
- "standard": {
- "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
- }
- },
- "handlers": {
- "console": {
- "level": "INFO",
- "class": "logging.StreamHandler",
- "formatter": "standard"
- },
- "file": {
- "level": "DEBUG",
- "class": "logging.FileHandler",
- "formatter": "standard",
- "filename": "/home/opnfv/functest/results/functest.log"
- }
- },
- "loggers": {
- "": {
- "handlers": ["console", "file"],
- "level": "DEBUG",
- "propagate": "yes"
- }
- }
-}
+{ + "version": 1, + "disable_existing_loggers": false, + "formatters": { + "standard": { + "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + } + }, + "handlers": { + "console": { + "level": "INFO", + "class": "logging.StreamHandler", + "formatter": "standard" + }, + "file": { + "level": "DEBUG", + "class": "logging.FileHandler", + "formatter": "standard", + "filename": "/home/opnfv/functest/results/functest.log" + } + }, + "loggers": { + "": { + "handlers": ["console", "file"], + "level": "DEBUG", + "propagate": "yes" + } + } +} diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index 8bbdf18b..b3e59020 100755 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -261,6 +261,14 @@ def install_tempest(): error_msg="Problem while installing Tempest.") +def create_flavor(): + os_utils.get_or_create_flavor('m1.tiny', + '512', + '1', + '1', + public=True) + + def check_environment(): msg_not_active = "The Functest environment is not installed." if not os.path.isfile(CONST.env_active): @@ -290,6 +298,7 @@ def main(**kwargs): verify_deployment() install_rally() install_tempest() + create_flavor() with open(CONST.env_active, "w") as env_file: env_file.write("1") diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index ef080016..320102dd 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -148,7 +148,11 @@ def run_test(test, tier_name, testcases=None): module = importlib.import_module(run_dict['module']) cls = getattr(module, run_dict['class']) test_case = cls() - result = test_case.run() + try: + kwargs = run_dict['args'] + result = test_case.run(**kwargs) + except KeyError: + result = test_case.run() if result == testcase_base.TestcaseBase.EX_OK: if GlobalVariables.REPORT_FLAG: test_case.publish_report() diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 032202e5..6397f764 100755 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -133,6 +133,10 @@ tiers: run: module: 'functest.opnfv_tests.sdn.odl.odl' class: 'ODLTests' + args: + suites: + - /home/opnfv/repos/odl_test/csit/suites/integration/basic + - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron - name: onos |