Improve 'application' role test coverage 12/117112/3
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Mon, 25 Jan 2021 15:33:22 +0000 (16:33 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 26 Jan 2021 08:34:40 +0000 (08:34 +0000)
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>
ansible/roles/application/molecule/default/tests/test_default.py
ansible/test/roles/prepare-application/tasks/main.yml

index 21fc40e..df50c47 100644 (file)
@@ -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"""
index 75abb80..9eb695b 100644 (file)
@@ -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/' }}"
   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 }}"