[k8s] Adjust externaldns test functions
- Use ctl hostname instead of k8s.kube_host due kube_host
is an ip address of keepalived k8s api.
- Discover ctl with specific role 'k8s_controller'
- Fix nit with awk field
- Fix nit with format fields
User-Story:https://mirantis.jira.com/browse/PROD-12826
Change-Id: I52d89b4d3994338a800eed4f6b5555cad6bdedc8
diff --git a/tcp_tests/tests/system/test_k8s_actions.py b/tcp_tests/tests/system/test_k8s_actions.py
index 77ed04a..ae3fa89 100644
--- a/tcp_tests/tests/system/test_k8s_actions.py
+++ b/tcp_tests/tests/system/test_k8s_actions.py
@@ -50,7 +50,7 @@
show_step(3)
k8s_deployed.kubectl_expose('deployment', name, '80', 'ClusterIP')
- hostname = "test.{0}.local".format(settings.LAB_CONFIG_NAME)
+ hostname = "test.{0}.local.".format(settings.LAB_CONFIG_NAME)
annotation = "\"external-dns.alpha.kubernetes.io/" \
"hostname={0}\"".format(hostname)
show_step(4)