summaryrefslogtreecommitdiffstats
path: root/ansible/roles
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-04 13:46:18 +0000
commit000cd0b8a3075d59f1e93a40c775662a3c2062f7 (patch)
treeb4d5bc5426df7f6a9fe8ec2aca1ffc88a7a30ed5 /ansible/roles
parent219c397298e5c99e33defd58e1ddf2181e1976f2 (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/roles')
-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/