[MOLECULE] Add testinfra test to nexus role 86/126386/3
authorOstap Batih <o.batih@samsung.com>
Wed, 29 Dec 2021 14:44:59 +0000 (14:44 +0000)
committerOstap Batih <o.batih@samsung.com>
Mon, 3 Jan 2022 13:33:13 +0000 (13:33 +0000)
Issue-ID: OOM-2889
Signed-off-by: Ostap Batih <o.batih@samsung.com>
Change-Id: Ie1685398a663badcaf16a44b1bf99ec0e5c29d60

ansible/roles/nexus/molecule/default/tests/test_default.py [new file with mode: 0644]
ansible/roles/nexus/molecule/ubuntu/molecule.yml

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 (file)
index 0000000..ede5315
--- /dev/null
@@ -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
index 1c1eaa9..8555a90 100644 (file)
@@ -31,3 +31,4 @@ provisioner:
     cleanup: ../default/cleanup.yml
 verifier:
   name: testinfra
+  directory: ../default/tests/