diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-02-12 14:03:54 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-02-12 14:19:43 +0100 |
commit | d6908ed39dd5e58c539c1c818f371849dd0271eb (patch) | |
tree | 9a3453740a2acc4a980ec1893ece3d5f9eefcaaf /ansible/roles/chartmuseum/molecule/default/tests | |
parent | 8fdadad54aa08b6c585549b74d1a8323eb751691 (diff) |
Run chartmuseum as a docker container
A docker container for chartmuseum is run with chart
storage volume mounted from hosts' resource dir for chart
repo persistence across container/infra restarts.
Change-Id: I692ff7a3d95414b439b15b5414bc8b959eb79414
Issue-ID: OOM-2665
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/chartmuseum/molecule/default/tests')
-rw-r--r-- | ansible/roles/chartmuseum/molecule/default/tests/test_default.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ansible/roles/chartmuseum/molecule/default/tests/test_default.py b/ansible/roles/chartmuseum/molecule/default/tests/test_default.py index 71d1978d..40773065 100644 --- a/ansible/roles/chartmuseum/molecule/default/tests/test_default.py +++ b/ansible/roles/chartmuseum/molecule/default/tests/test_default.py @@ -6,11 +6,9 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') -def test_chartmuseum(host): - ansible_vars = host.ansible.get_variables() - p = host.process.get(comm="chartmuseum") - assert 'chartmuseum --storage local --storage-local-rootdir /opt/' +\ - ansible_vars['app_name'] + '/chartmuseum -port ' +\ - ansible_vars['chartmuseum_port'] in p.args - assert host.file("/opt/" + ansible_vars['app_name'] + - "/chartmuseum").is_directory +def test_chartmuseum_dir(host): + assert host.file("/chartmuseum").is_directory + + +def test_container_running(host): + assert host.docker('chartmuseum').is_running |