Add test_k8s_dashboard test
Add 'cluster role binding' api wrapper
Add method in TestMCPK8sActions to read testdata yamls
Change-Id: I7b9f7a74ce74ea5e722cb4c958bd60b6a64b6a0c
Related-PROD: PROD-22249
diff --git a/tcp_tests/managers/k8smanager.py b/tcp_tests/managers/k8smanager.py
index a72f2f1..748cb04 100644
--- a/tcp_tests/managers/k8smanager.py
+++ b/tcp_tests/managers/k8smanager.py
@@ -364,15 +364,19 @@
return self.controller_check_call("nslookup {0} {1}".format(host, src))
@retry(300, exception=DevopsCalledProcessError)
- def curl(self, url):
+ def curl(self, url, *args):
"""
Run curl on controller and return stdout
:param url: url to curl
- :return: response string
+ :return: list of strings (with /n at end of every line)
"""
- result = self.controller_check_call("curl -s -S \"{}\"".format(url))
- LOG.debug("curl \"{0}\" result: {1}".format(url, result['stdout']))
+ args = list(args)
+ args.append(url)
+ cmd = "curl -s -S {}".format(
+ " ".join(["'{}'".format(a.replace("'", "\\'")) for a in args]))
+ result = self.controller_check_call(cmd)
+ LOG.debug("{0}\nresult:\n{1}".format(cmd, result['stdout']))
return result['stdout']