diff options
author | Ostap Batih <o.batih@samsung.com> | 2021-12-22 09:13:33 +0000 |
---|---|---|
committer | Ostap Batih <o.batih@samsung.com> | 2021-12-22 12:12:05 +0000 |
commit | be68bce60b90eefe0b67e662062c18d3d05fac78 (patch) | |
tree | d8feb5613875750068651131ea59634a5cb7435f | |
parent | 103ad81920d28186765b01c9dbffe4146286da1b (diff) |
[MOLECULE] Add testinfra tests for dns role
Issue-ID: OOM-2889
Signed-off-by: Ostap Batih <o.batih@samsung.com>
Change-Id: I9c653bdaa8cfcd1a8e187cbf899c060a6299457c
-rw-r--r-- | ansible/roles/dns/molecule/default/molecule.yml | 4 | ||||
-rw-r--r-- | ansible/roles/dns/molecule/default/tests/test_default.py | 12 | ||||
-rw-r--r-- | ansible/roles/dns/molecule/ubuntu/molecule.yml | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/ansible/roles/dns/molecule/default/molecule.yml b/ansible/roles/dns/molecule/default/molecule.yml index c3ed309a..131c887b 100644 --- a/ansible/roles/dns/molecule/default/molecule.yml +++ b/ansible/roles/dns/molecule/default/molecule.yml @@ -27,9 +27,5 @@ provisioner: host_vars: infrastructure-server: cluster_ip: 127.0.0.1 - group_vars: - all: - app_name: onap - app_data_path: "/opt/{{ app_name }}" verifier: name: testinfra 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 diff --git a/ansible/roles/dns/molecule/ubuntu/molecule.yml b/ansible/roles/dns/molecule/ubuntu/molecule.yml index 191da95e..0a9fbad4 100644 --- a/ansible/roles/dns/molecule/ubuntu/molecule.yml +++ b/ansible/roles/dns/molecule/ubuntu/molecule.yml @@ -31,9 +31,5 @@ provisioner: host_vars: infrastructure-server: cluster_ip: 127.0.0.1 - group_vars: - all: - app_name: onap - app_data_path: "/opt/{{ app_name }}" verifier: name: testinfra |