diff options
author | 2021-03-25 22:27:55 +0530 | |
---|---|---|
committer | 2021-03-25 22:30:14 +0530 | |
commit | 300d9f201aba1b8e30387138acaba79a72502d82 (patch) | |
tree | 4e2106616d80f988d34529768f64f18c8c8a09a2 /testcases | |
parent | e4075a1d6e54fef93f75e3e65e32fff611fc0eb8 (diff) |
K8S: Ensure Correct Mode-Checking.
This patch add fix to a minor bug.
Run pod operations only in K8S mode.
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: I8dd0e6c738e382a2b5981739282cb109c67ab862
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases/testcase.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py index 51d212b4..c300bfc1 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -200,6 +200,10 @@ class TestCase(object): if S.getValue('LLC_ALLOCATION'): self._rmd = rmd.CacheAllocator() + # If running in k8s mode. + # This value is set in main vsperf file + self._k8s = S.getValue('K8S') + def run_initialize(self): """ Prepare test execution environment """ @@ -218,12 +222,11 @@ class TestCase(object): len(self._step_vnf_list)) self._vnf_list = self._vnf_ctl.get_vnfs() - - self._pod_ctl = component_factory.create_pod( - self.deployment, - loader.get_pod_class()) - - self._pod_list = self._pod_ctl.get_pods() + if self._k8s: + self._pod_ctl = component_factory.create_pod( + self.deployment, + loader.get_pod_class()) + self._pod_list = self._pod_ctl.get_pods() # verify enough hugepages are free to run the testcase if not self._check_for_enough_hugepages(): |