summaryrefslogtreecommitdiffstats
path: root/ansible/roles/dns/molecule/default/tests/test_default.py
diff options
context:
space:
mode:
authorOstap Batih <o.batih@samsung.com>2021-12-22 09:13:33 +0000
committerOstap Batih <o.batih@samsung.com>2021-12-22 11:44:04 +0000
commit9127db9adba9051c9a0f07f3c29f3bd0113e62c5 (patch)
tree6c9f78a2399c2f5e7543bb3d764df68a7f0d113e /ansible/roles/dns/molecule/default/tests/test_default.py
parent73a80b4d1f61a821f6530851fea395bc6ffecff8 (diff)
[MOLECULE] Add testinfra tests for dns role
Issue-ID: OOM-2889 Signed-off-by: Ostap Batih <o.batih@samsung.com> Change-Id: I9c653bdaa8cfcd1a8e187cbf899c060a6299457c
Diffstat (limited to 'ansible/roles/dns/molecule/default/tests/test_default.py')
-rw-r--r--ansible/roles/dns/molecule/default/tests/test_default.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ansible/roles/dns/molecule/default/tests/test_default.py b/ansible/roles/dns/molecule/default/tests/test_default.py
new file mode 100644
index 00000000..76700d42
--- /dev/null
+++ b/ansible/roles/dns/molecule/default/tests/test_default.py
@@ -0,0 +1,12 @@
+def test_dir(host):
+ f = host.file('/cfg')
+ assert f.exists
+ assert f.is_directory
+
+
+def test_hostname_file(host):
+ assert host.file('/cfg/simulated_hosts').exists
+
+
+def test_dns_container(host):
+ assert host.docker('dns-server').is_running