diff options
Diffstat (limited to 'ansible/roles/application/molecule')
-rw-r--r-- | ansible/roles/application/molecule/default/tests/test_default.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ansible/roles/application/molecule/default/tests/test_default.py b/ansible/roles/application/molecule/default/tests/test_default.py index 21fc40e4..f57f5afc 100644 --- a/ansible/roles/application/molecule/default/tests/test_default.py +++ b/ansible/roles/application/molecule/default/tests/test_default.py @@ -10,21 +10,30 @@ def test_helm_commands(host): fc = host.file('/tmp/helm_simu_output').content_string helm_release = host.ansible.get_variables()['helm_version'] if helm_release == 'v2': - content_str1 = 'home' - elif helm_release == 'v3': - content_str1 = 'env' - expected_content = content_str1 + """ + 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 \ +deploy moleculetestapp local/moleculetestapp --namespace \ moleculetestapp -f /opt/moleculetestapp/helm_charts/onap/resources/\ overrides/onap-all.yaml -f /opt/moleculetestapp/override.yaml \ --timeout 1800""" + expected_plugin_path = '/plugins/deploy/deploy.sh' + elif helm_release == 'v3': + expected_content = """env +repo list +repo add local http://127.0.0.1:8879 +deploy moleculetestapp local/moleculetestapp --namespace \ +moleculetestapp -f /opt/moleculetestapp/helm_charts/onap/resources/\ +overrides/onap-all.yaml -f /opt/moleculetestapp/override.yaml \ +--timeout 1800s""" + expected_plugin_path = '/root/.local/share/helm/plugins/deploy/' +\ + 'deploy.sh' assert fc == expected_content + assert host.file(expected_plugin_path).exists def test_helm_override_file(host): |