summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorOstap Batih <o.batih@samsung.com>2021-12-29 14:44:59 +0000
committerOstap Batih <o.batih@samsung.com>2022-01-03 13:33:13 +0000
commit8de1c4868cf72bd1929dc3088757f3ae1c2593be (patch)
tree4327d7f11d049a7b97fc682252c0febd1ff3a319 /ansible
parentc4648f2efb8744288ba9b0e5814c3a5eb39335e6 (diff)
[MOLECULE] Add testinfra test to nexus role
Issue-ID: OOM-2889 Signed-off-by: Ostap Batih <o.batih@samsung.com> Change-Id: Ie1685398a663badcaf16a44b1bf99ec0e5c29d60
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/nexus/molecule/default/tests/test_default.py11
-rw-r--r--ansible/roles/nexus/molecule/ubuntu/molecule.yml1
2 files changed, 12 insertions, 0 deletions
diff --git a/ansible/roles/nexus/molecule/default/tests/test_default.py b/ansible/roles/nexus/molecule/default/tests/test_default.py
new file mode 100644
index 00000000..ede53150
--- /dev/null
+++ b/ansible/roles/nexus/molecule/default/tests/test_default.py
@@ -0,0 +1,11 @@
+def test_dir(host):
+ f = host.file('/nexus_data')
+ assert f.exists
+ assert f.is_directory
+ assert f.uid == 200
+ assert f.gid == 200
+
+
+def test_nexus_container(host):
+ c = host.docker('nexus')
+ assert c.is_running
diff --git a/ansible/roles/nexus/molecule/ubuntu/molecule.yml b/ansible/roles/nexus/molecule/ubuntu/molecule.yml
index 1c1eaa9b..8555a902 100644
--- a/ansible/roles/nexus/molecule/ubuntu/molecule.yml
+++ b/ansible/roles/nexus/molecule/ubuntu/molecule.yml
@@ -31,3 +31,4 @@ provisioner:
cleanup: ../default/cleanup.yml
verifier:
name: testinfra
+ directory: ../default/tests/