aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteven stark <steven.stark@att.com>2019-09-18 17:07:27 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-18 17:07:27 +0000
commit6202d9d300e76d6684c1ee77d31646737f64374e (patch)
treea2a97c37648d27e2f3c2279e8d91e1dd29e3b562
parentc4bec47386b0df6c88d766f9d694ba5e77e43b0b (diff)
parent3c68447c6146b045064d51eba3d024dcbc0b684f (diff)
Merge "[VVP] Replaced test.csar in preload_tests"
-rw-r--r--ice_validator/app_tests/preload_tests/preload_envs/test.csarbin117854 -> 125096 bytes
-rw-r--r--ice_validator/app_tests/preload_tests/test_environment.py18
-rw-r--r--ice_validator/preload/environment.py4
3 files changed, 11 insertions, 11 deletions
diff --git a/ice_validator/app_tests/preload_tests/preload_envs/test.csar b/ice_validator/app_tests/preload_tests/preload_envs/test.csar
index d23a746..9876d2e 100644
--- a/ice_validator/app_tests/preload_tests/preload_envs/test.csar
+++ b/ice_validator/app_tests/preload_tests/preload_envs/test.csar
Binary files differ
diff --git a/ice_validator/app_tests/preload_tests/test_environment.py b/ice_validator/app_tests/preload_tests/test_environment.py
index c815bb2..8d06a92 100644
--- a/ice_validator/app_tests/preload_tests/test_environment.py
+++ b/ice_validator/app_tests/preload_tests/test_environment.py
@@ -56,27 +56,27 @@ def env():
def test_csar_service_name(csar):
- assert csar.service_name == "stark_vccf_svc"
+ assert csar.service_name == "stark_0917_vlb_svc"
def test_csar_str_and_repr(csar):
- assert str(csar) == "CSAR (path=test.csar, name=stark_vccf_svc)"
- assert repr(csar) == "CSAR (path=test.csar, name=stark_vccf_svc)"
+ assert str(csar) == "CSAR (path=test.csar, name=stark_0917_vlb_svc)"
+ assert repr(csar) == "CSAR (path=test.csar, name=stark_0917_vlb_svc)"
def test_csar_vf_module_model_name(csar):
assert (
- csar.get_vf_module_model_name("base_vIECCF")
- == "StarkVccfVf..base_vIECCF..module-0"
+ csar.get_vf_module_model_name("vdns")
+ == "Stark0917VlbVf..vdns..module-3"
)
def test_csar_get_vf_module_resource_name(csar):
- assert csar.get_vf_module_resource_name("base_vIECCF") == "stark_vccf_vf"
+ assert csar.get_vf_module_resource_name("vdns") == "stark_0917_vlb_vf"
def test_csar_get_vnf_type(csar):
- assert csar.get_vnf_type("base_vIECCF") == "stark_vccf_svc/stark_vccf_vf"
+ assert csar.get_vnf_type("vdns") == "stark_0917_vlb_svc/stark_0917_vlb_vf"
def test_csar_get_vf_module_resource_name_not_found(csar):
@@ -84,12 +84,12 @@ def test_csar_get_vf_module_resource_name_not_found(csar):
def test_preload_environment_global_csar(env):
- assert env.csar.service_name == "stark_vccf_svc"
+ assert env.csar.service_name == "stark_0917_vlb_svc"
def test_preload_environment_nest_env_csar_inherit(env):
env_two = env.get_environment("env_two")
- assert env_two.csar.service_name == "stark_vccf_svc"
+ assert env_two.csar.service_name == "stark_0917_vlb_svc"
def test_preload_environment_nest_env_csar_override(env):
diff --git a/ice_validator/preload/environment.py b/ice_validator/preload/environment.py
index 3570dc5..4851fcb 100644
--- a/ice_validator/preload/environment.py
+++ b/ice_validator/preload/environment.py
@@ -168,7 +168,7 @@ class CloudServiceArchive:
return self._service.get("metadata", {}).get("name")
def __repr__(self):
- return f"CSAR (path={self.csar_path.name}, name={self.service_name})"
+ return "CSAR (path={}, name={})".format(self.csar_path.name, self.service_name)
def __str__(self):
return repr(self)
@@ -277,4 +277,4 @@ class PreloadEnvironment:
return self.base_dir.name
def __repr__(self):
- return f"PreloadEnvironment(name={self.name})"
+ return "PreloadEnvironment(name={})".format(self.name)