3 import testinfra.utils.ansible_runner
5 testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
6 os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
9 def test_helm_commands(host):
10 fc = host.file('/tmp/helm_simu_output').content_string.strip()
11 expected_content = """env
13 repo add local http://127.0.0.1:8879
14 deploy moleculetestapp local/moleculetestapp --namespace \
15 moleculetestapp -f /opt/moleculetestapp/helm_charts/onap/resources/\
16 overrides/onap-all.yaml -f /opt/moleculetestapp/override.yaml \
18 expected_plugin_path = '/root/.local/share/helm/plugins/deploy/' +\
20 assert fc == expected_content
21 assert host.file(expected_plugin_path).exists
24 def test_helm_override_file(host):
25 fc = host.file('/opt/moleculetestapp/override.yaml').content_string.strip()
26 expected_content = """global:
27 cacert: 'this is dummy server certificate value
30 assert fc == expected_content