aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2024-02-26 09:21:36 +0100
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2024-02-26 09:40:41 +0100
commit2b8d4d3dfda94890f3badda9928374fad9b659c3 (patch)
treead162fdaad202518d014cba7e2ba10fdcb3d1179
parent1a3dccf17efeffb10466ed0ad2e1895cbd859920 (diff)
Fix the issue of basic_vm_macro configuration
- Fix the issue of basic_vm_macro introduced after refactoring - new SDK version used - tox updated with helper commands Issue-ID: TEST-402 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I46aedcd08279142b2da48a431ab4f21ae1c9d3d1
-rw-r--r--requirements.txt2
-rw-r--r--src/onaptests/configuration/basic_vm_macro_settings.py23
-rw-r--r--tox.ini23
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"
diff --git a/tox.ini b/tox.ini
index 823f5c5..6c1a015 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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