diff options
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | src/onaptests/configuration/basic_vm_macro_settings.py | 23 | ||||
-rw-r--r-- | tox.ini | 23 |
3 files changed, 37 insertions, 11 deletions
diff --git a/requirements.txt b/requirements.txt index d71bf84..b447cd2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ cryptography==38.0.4 xtesting==0.91.0 avionix>=0.4.5 openstacksdk>=0.61.0 -onapsdk==13.0.2 +onapsdk==13.0.3 jinja2>3 kubernetes>=22.6.0 setuptools==65.3.0 diff --git a/src/onaptests/configuration/basic_vm_macro_settings.py b/src/onaptests/configuration/basic_vm_macro_settings.py index 8c1b927..6276964 100644 --- a/src/onaptests/configuration/basic_vm_macro_settings.py +++ b/src/onaptests/configuration/basic_vm_macro_settings.py @@ -1,3 +1,6 @@ +import os + +import openstack from pathlib import Path from uuid import uuid4 @@ -33,16 +36,16 @@ COMPLEX_DATA_CENTER_CODE = "1234-5" GLOBAL_CUSTOMER_ID = "basicvm-customer" -# if not IF_VALIDATION: -# TEST_CLOUD = os.getenv('OS_TEST_CLOUD') -# cloud = openstack.connect(cloud=TEST_CLOUD) -# VIM_USERNAME = cloud.config.auth.get('username', 'Fill me') -# VIM_PASSWORD = cloud.config.auth.get('password', 'Fill me') -# VIM_SERVICE_URL = cloud.config.auth.get('auth_url', 'Fill me') -# TENANT_ID = cloud.config.auth.get('project_id', 'Fill me') -# TENANT_NAME = cloud.config.auth.get('project_name', 'Fill me') -# CLOUD_REGION_ID = cloud.config.auth.get('region_name', 'RegionOne') -# CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name', 'Default') +if not IF_VALIDATION: + TEST_CLOUD = os.getenv('OS_TEST_CLOUD') + cloud = openstack.connect(cloud=TEST_CLOUD) + VIM_USERNAME = cloud.config.auth.get('username', 'Fill me') + VIM_PASSWORD = cloud.config.auth.get('password', 'Fill me') + VIM_SERVICE_URL = cloud.config.auth.get('auth_url', 'Fill me') + TENANT_ID = cloud.config.auth.get('project_id', 'Fill me') + TENANT_NAME = cloud.config.auth.get('project_name', 'Fill me') + CLOUD_REGION_ID = cloud.config.auth.get('region_name', 'RegionOne') + CLOUD_DOMAIN = cloud.config.auth.get('project_domain_name', 'Default') OWNING_ENTITY = "basicvm-oe" PROJECT = "basicvm-project" @@ -74,3 +74,26 @@ skip_install = True setenv = PYTHONPATH = {toxinidir}/src commands = python run_test.py all true + +[testenv:run-test] +basepython = python3.11 +deps = + -rrequirements.txt +skip_install = True +setenv = + PYTHONPATH = {toxinidir}/src +commands = python run_test.py {posargs} + +[testenv:isort-check] +basepython = python3.11 +deps = + isort +skip_install = True +commands = isort src/onaptests --check --thirdparty=onapsdk + +[testenv:isort-fix] +basepython = python3.11 +deps = + isort +skip_install = True +commands = isort src/onaptests --thirdparty=onapsdk |