Adding /etc/hosts test
diff --git a/cvp_checks/tests/test_etc_hosts.py b/cvp_checks/tests/test_etc_hosts.py
new file mode 100644
index 0000000..72581c0
--- /dev/null
+++ b/cvp_checks/tests/test_etc_hosts.py
@@ -0,0 +1,20 @@
+import pytest
+import json
+
+
+def test_etc_hosts(local_salt_client):
+ nodes_info = local_salt_client.cmd(
+ '*', 'cmd.run',
+ ['cat /etc/hosts']
+ )
+ result = {}
+ for node in nodes_info.keys():
+ for nd in nodes_info.keys():
+ if node not in nodes_info[nd]:
+ if node in result:
+ result[node]+=','+nd
+ else:
+ result[node]=nd
+ assert len(result) <= 1, \
+ "Some hosts are not presented in /etc/hosts: {0}".format(
+ json.dumps(result, indent=4))