aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes/netperf/netperf.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-10-21 17:21:54 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-10-21 17:28:40 +0200
commitd744fb5276d47fb3ba7ad2d4cb1fb2d3bfaca3eb (patch)
tree8d6f4e1146baf7bd467212f6087225b3f65b298c /functest_kubernetes/netperf/netperf.py
parentabcc9aa9e57a8af8e4479f897a77c22b16324f6a (diff)
Use Path.home() instead of ~
Change-Id: I5863f4e0315b67a07dab4756857dba7aa37932f0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest_kubernetes/netperf/netperf.py')
-rw-r--r--functest_kubernetes/netperf/netperf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest_kubernetes/netperf/netperf.py b/functest_kubernetes/netperf/netperf.py
index 31788176..b0cd8e40 100644
--- a/functest_kubernetes/netperf/netperf.py
+++ b/functest_kubernetes/netperf/netperf.py
@@ -14,6 +14,7 @@ Benchmarking Kubernetes Networking Performance
import glob
import logging
import os
+from pathlib import Path
import shutil
import subprocess
import time
@@ -44,7 +45,7 @@ class Netperf(testcase.TestCase):
if not os.path.exists(self.res_dir):
os.makedirs(self.res_dir)
cmd = ['launch', '-iterations', '1', '-kubeConfig',
- '~/.kube/config']
+ f'{Path.home()}/.kube/config']
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
lfiles = glob.glob(os.path.join(