From 7ab529a15d7b441e5338eaea0f2f567fe67cd34c Mon Sep 17 00:00:00 2001 From: tierno Date: Fri, 30 Aug 2019 12:10:17 +0000 Subject: [PATCH] test_ns: get VCA env for secret and pubkey Change-Id: I160692c18791e034a65dfe2623d877719809f9f5 Signed-off-by: tierno --- osm_lcm/__init__.py | 4 ++-- osm_lcm/tests/test_ns.py | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/osm_lcm/__init__.py b/osm_lcm/__init__.py index 6c22348..7fd7d55 100644 --- a/osm_lcm/__init__.py +++ b/osm_lcm/__init__.py @@ -13,5 +13,5 @@ ## # version moved to lcm.py. uncomment if LCM is installed as library and installed -version = '6.0.2.post0' -version_date = '2018-08-29' +version = '6.0.2.post1' +version_date = '2018-08-30' diff --git a/osm_lcm/tests/test_ns.py b/osm_lcm/tests/test_ns.py index eb13e45..dcf5020 100644 --- a/osm_lcm/tests/test_ns.py +++ b/osm_lcm/tests/test_ns.py @@ -31,7 +31,7 @@ from uuid import uuid4 __author__ = "Alfonso Tierno " -""" Perform unittests using asynctest +""" Perform unittests using asynctest of osm_lcm.ns module It allows, if some testing ENV are supplied, testing without mocking some external libraries for debugging: OSMLCMTEST_NS_PUBKEY: public ssh-key returned by N2VC to inject to VMs OSMLCMTEST_PACKAGES_PATH: path where the vnf-packages are stored (de-compressed), each one on a 'vnfd_id' folder @@ -39,7 +39,7 @@ It allows, if some testing ENV are supplied, testing without mocking some extern OSMLCMTEST_VCA_NOMOCK: Do no mock the VCA, N2VC library, for debugging it OSMLCMTEST_RO_NOMOCK: Do no mock the ROClient library, for debugging it OSMLCMTEST_DB_NOMOCK: Do no mock the database library, for debugging it - OSMLCMTEST_FS_NOMOCK: Do no mock the File Sorage library, for debugging it + OSMLCMTEST_FS_NOMOCK: Do no mock the File Storage library, for debugging it OSMLCMTEST_LOGGING_NOMOCK: Do no mock the logging OSMLCM_VCA_XXX: configuration of N2VC OSMLCM_RO_XXX: configuration of RO @@ -48,9 +48,11 @@ It allows, if some testing ENV are supplied, testing without mocking some extern vca_config = { # TODO replace with os.get_env to get other configurations "host": getenv("OSMLCM_VCA_HOST", "vca"), - "port": 17070, - "user": "admin", - "secret": "secret", + "port": getenv("OSMLCM_VCA_PORT", 17070), + "user": getenv("OSMLCM_VCA_USER", "admin"), + "secret": getenv("OSMLCM_VCA_SECRET", "vca"), + "pubkey": getenv("OSMLCM_VCA_PUBKEY", None), + 'cacert': getenv("OSMLCM_VCA_CACERT", None) } ro_config = { -- 2.25.1