diff options
author | 2021-08-04 08:35:09 +0000 | |
---|---|---|
committer | 2021-12-14 13:55:52 +0000 | |
commit | 54803e59a08d09bbb34cb686740f41b1e7bc3684 (patch) | |
tree | 182279aa12e07db86e5c210cbcee7f5500b8206a /src/onaptests/steps/simulator | |
parent | 337aa506b763cd3c3799a9e874f5c4fccad73fa1 (diff) |
[TEST] Do not create simulators in "onap" namespace
As described in ticket - that resource shouldn't be created in onap namespace because if it's not properly deleted it has impact on the security tests results.
Note: That change doesn't require any additional work in lab preparation - the namespace is going to be created by MSB K8S plugin.
Issue-ID: TEST-356
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I0acf6262e3c8c9fbe9113d96e62960ce36ece04c
Diffstat (limited to 'src/onaptests/steps/simulator')
-rw-r--r-- | src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py index caeb20b..1960659 100644 --- a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py +++ b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py @@ -51,7 +51,7 @@ class PnfSimulatorCnfRegisterStep(BaseStep): k8s_watch: "Watch" = watch.Watch() try: for event in k8s_watch.stream(k8s_client.list_namespaced_pod, - namespace=settings.K8S_NAMESPACE, + namespace=settings.K8S_ADDITIONAL_RESOURCES_NAMESPACE, timeout_seconds=timeout_seconds): if event["object"].metadata.name == "pnf-macro-test-simulator": if not event["object"].status.phase in ["Pending", "Running"]: @@ -76,7 +76,7 @@ class PnfSimulatorCnfRegisterStep(BaseStep): config.load_kube_config(settings.K8S_CONFIG) k8s_client: "CoreV1API" = client.CoreV1Api() try: - for service in k8s_client.list_namespaced_service(namespace=settings.K8S_NAMESPACE).items: + for service in k8s_client.list_namespaced_service(namespace=settings.K8S_ONAP_NAMESPACE).items: if service.metadata.name == settings.DCAE_VES_COLLECTOR_POD_NAME: return service.spec.cluster_ip, service.spec.ports[0].port raise EnvironmentPreparationException("Couldn't get VES ip and port") |