From 6137435bebd81625efe55b5654c529e47e050af0 Mon Sep 17 00:00:00 2001 From: Juha Kosonen Date: Wed, 10 Oct 2018 13:08:18 +0300 Subject: Set Ginkgo's reporter not to print out in color Change-Id: If0ef89ba521d02b5ea1a1fcb5bc3e546f93e2859 Signed-off-by: Juha Kosonen (cherry picked from commit 51fb9ee1ff83d90874bd24847df33739a7cf1b79) --- functest_kubernetes/k8stest.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'functest_kubernetes') diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py index dd1f66bc..59eb999e 100644 --- a/functest_kubernetes/k8stest.py +++ b/functest_kubernetes/k8stest.py @@ -45,9 +45,6 @@ class K8sTesting(testcase.TestCase): process = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = process.stdout.read() - # Remove color code escape sequences - output = re.sub(r'\x1B\[[0-?]*[ -/]*[@-~]', '', str(output)) - if ('Error loading client' in output or 'Unexpected error' in output): raise Exception(output) @@ -121,8 +118,9 @@ class K8sSmokeTest(K8sTesting): if "case_name" not in kwargs: kwargs.get("case_name", 'k8s_smoke') super(K8sSmokeTest, self).__init__(**kwargs) - self.cmd = ["e2e.test", "-ginkgo.focus", "Guestbook.application", - "-kubeconfig", self.config, "--provider", "local"] + self.cmd = ['e2e.test', '-ginkgo.focus', 'Guestbook.application', + '-ginkgo.noColor', '-kubeconfig', self.config, + '--provider', 'local'] class K8sConformanceTest(K8sTesting): @@ -132,4 +130,5 @@ class K8sConformanceTest(K8sTesting): kwargs.get("case_name", 'k8s_conformance') super(K8sConformanceTest, self).__init__(**kwargs) self.cmd = ['e2e.test', '-ginkgo.focus', 'Conformance', - '-kubeconfig', self.config, "--provider", "local"] + '-ginkgo.noColor', '-kubeconfig', self.config, + '--provider', 'local'] -- cgit 1.2.3-korg