summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2020-12-17 11:11:36 +0530
committerVaibhav Mahajan <vamahaja@redhat.com>2020-12-17 09:07:57 +0000
commitce9861d28bcf8795c0c1418be99fc3b94b9c766a (patch)
tree30294e33bb2195a01f557a0c6bd1c5e42e1078d9
parentec3024a56bb2ce12772dcf95450d372e38824da1 (diff)
[TestFix] Fix 'current_project' name to 'storage_project_name'
Change-Id: Ib632eb9cded6ae938cb745edea4f40add97e5126 Signed-off-by: vamahaja <vamahaja@redhat.com>
-rw-r--r--tests/functional/prometheous/test_prometheus_validations_file.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/functional/prometheous/test_prometheus_validations_file.py b/tests/functional/prometheous/test_prometheus_validations_file.py
index 313cb713..876c40d4 100644
--- a/tests/functional/prometheous/test_prometheus_validations_file.py
+++ b/tests/functional/prometheous/test_prometheus_validations_file.py
@@ -11,7 +11,6 @@ from glusto.core import Glusto as g
import pytest
from openshiftstoragelibs import baseclass
-from openshiftstoragelibs import command
from openshiftstoragelibs import exceptions
from openshiftstoragelibs import openshift_ops
@@ -48,8 +47,6 @@ class TestPrometheusValidationFile(baseclass.BaseClass):
self.skipTest("Config file doesn't have key {}".format(err))
self._master = self.ocp_master_node[0]
- cmd = "oc project --short=true"
- self.current_project = command.cmd_run(cmd, self._master)
def _fetch_metric_from_promtheus_pod(self, metric):
"""Fetch metric from prometheus pod using api call"""
@@ -74,7 +71,7 @@ class TestPrometheusValidationFile(baseclass.BaseClass):
openshift_ops.switch_oc_project(self._master,
self._prometheus_project_name)
self.addCleanup(openshift_ops.switch_oc_project,
- self._master, self.current_project)
+ self._master, self.storage_project_name)
metric_data = dict()
for metric in metrics:
@@ -119,7 +116,8 @@ class TestPrometheusValidationFile(baseclass.BaseClass):
self.metrics, pvc_name)
# Mark the current node unschedulable on which app pod is running
- openshift_ops.switch_oc_project(self._master, self.current_project)
+ openshift_ops.switch_oc_project(
+ self._master, self.storage_project_name)
pod_info = openshift_ops.oc_get_pods(self._master, name=pod_name)
openshift_ops.oc_adm_manage_node(
self._master, '--schedulable=false',