summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/molecule/default/tests
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-04-17 19:42:59 +0300
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-05-16 11:39:26 +0000
commit8fd23141ffc7dd2f3c02b62e8fed1ff8364319b0 (patch)
tree0e3a9df5693f50f0cee9e10d406a75ce7fa0ba72 /ansible/roles/application/molecule/default/tests
parent0b66903e11a12cbdaf8db9f03fa3da96c375a0af (diff)
Molecule tests for application role.
Issue-ID: OOM-1812 Change-Id: Ifb6f5a10afb4014b20be77a4141371e561d346ce Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/roles/application/molecule/default/tests')
-rw-r--r--ansible/roles/application/molecule/default/tests/test_default.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/ansible/roles/application/molecule/default/tests/test_default.py b/ansible/roles/application/molecule/default/tests/test_default.py
new file mode 100644
index 00000000..3e0cbb42
--- /dev/null
+++ b/ansible/roles/application/molecule/default/tests/test_default.py
@@ -0,0 +1,29 @@
+import os
+
+import testinfra.utils.ansible_runner
+
+testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
+ os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
+
+
+def test_helm_commands(host):
+ fc = host.file('/tmp/helm_simu_output').content_string
+ expected_content = """home
+init --upgrade --skip-refresh
+version --tiller-connection-timeout 10
+repo list
+serve
+repo list
+repo add local http://127.0.0.1:8879
+install --name moleculetestapp local/moleculetestapp --namespace \
+moleculetestapp -f /opt/moleculetestapp/override.yaml"""
+ assert fc == expected_content
+
+
+def test_helm_override_file(host):
+ fc = host.file('/opt/moleculetestapp/override.yaml').content_string
+ expected_content = """global:
+ cacert: 'this is dummy server certificate value
+
+ '"""
+ assert fc == expected_content