summaryrefslogtreecommitdiffstats
path: root/ansible/roles/vncserver/molecule/default/tests
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-12 16:17:18 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-06-13 09:01:40 +0200
commit5f6e33397ce71d9731d330778402220b44cf96a9 (patch)
tree98d997e29ff0db8c2557f76200e3ceeff2eee547 /ansible/roles/vncserver/molecule/default/tests
parent3cd75cd8d71f471a0217f525bb8e4ed5315266a8 (diff)
Add role level tests for 'vncserver' role
A cleanup stage is also added to clean testing artifacts. Change-Id: I2255a0e90a0f609bd927d3d44dd05b5847fbdfb0 Issue-ID: OOM-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/vncserver/molecule/default/tests')
-rw-r--r--ansible/roles/vncserver/molecule/default/tests/test_default.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ansible/roles/vncserver/molecule/default/tests/test_default.py b/ansible/roles/vncserver/molecule/default/tests/test_default.py
new file mode 100644
index 00000000..0164a3ee
--- /dev/null
+++ b/ansible/roles/vncserver/molecule/default/tests/test_default.py
@@ -0,0 +1,10 @@
+import os
+
+import testinfra.utils.ansible_runner
+
+testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
+ os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('infrastructure')
+
+
+def test_container_running(host):
+ assert host.docker('vnc-server').is_running