summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-01-25 16:33:22 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-01-26 08:34:40 +0000
commit52bd1fdc541a9277e5a24437576902511113670d (patch)
tree73152ab96ec0e5e3bfd4c055adcd67ccbfc3ccd7
parent2c7299fa340e6918a59d92981f01652e9464ee86 (diff)
Improve 'application' role test coverage
Helm plugin installation task is now also covered Change-Id: Ib0a724de5dc1b300ea6cd27fe363b99b071d787b Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rw-r--r--ansible/roles/application/molecule/default/tests/test_default.py2
-rw-r--r--ansible/test/roles/prepare-application/tasks/main.yml9
2 files changed, 10 insertions, 1 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..df50c472 100644
--- a/ansible/roles/application/molecule/default/tests/test_default.py
+++ b/ansible/roles/application/molecule/default/tests/test_default.py
@@ -20,7 +20,7 @@ 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"""
diff --git a/ansible/test/roles/prepare-application/tasks/main.yml b/ansible/test/roles/prepare-application/tasks/main.yml
index 75abb802..9eb695b1 100644
--- a/ansible/test/roles/prepare-application/tasks/main.yml
+++ b/ansible/test/roles/prepare-application/tasks/main.yml
@@ -6,6 +6,7 @@
delegate_to: localhost
loop:
- "{{ app_helm_charts_install_directory }}"
+ - "{{ app_helm_charts_install_directory + '/helm' + '/plugins' + '/deploy' }}"
- certs
- "{{ application_pre_install_role + '/tasks/' }}"
- "{{ application_post_install_role + '/tasks/' }}"
@@ -19,6 +20,14 @@
delegate_to: localhost
when: simulate_helm
+- name: Create Helm plugin mock
+ copy:
+ content: |
+ # Mocked Helm plugin
+ dest: "{{ app_helm_charts_install_directory + '/helm' + '/plugins' + '/deploy' }}/deploy.sh"
+ delegate_to: localhost
+ when: simulate_helm
+
- name: Clean previous simulation output file
file:
path: "{{ helm_simulation_output_file }}"