summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-application
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-04-17 19:42:59 +0300
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-05-16 11:39:26 +0000
commit8fd23141ffc7dd2f3c02b62e8fed1ff8364319b0 (patch)
tree0e3a9df5693f50f0cee9e10d406a75ce7fa0ba72 /ansible/test/roles/prepare-application
parent0b66903e11a12cbdaf8db9f03fa3da96c375a0af (diff)
Molecule tests for application role.
Issue-ID: OOM-1812 Change-Id: Ifb6f5a10afb4014b20be77a4141371e561d346ce Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/test/roles/prepare-application')
-rw-r--r--ansible/test/roles/prepare-application/defaults/main.yml4
-rw-r--r--ansible/test/roles/prepare-application/tasks/main.yml47
2 files changed, 51 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-application/defaults/main.yml b/ansible/test/roles/prepare-application/defaults/main.yml
new file mode 100644
index 00000000..227bd4f0
--- /dev/null
+++ b/ansible/test/roles/prepare-application/defaults/main.yml
@@ -0,0 +1,4 @@
+---
+simulate_helm: true
+app_helm_charts_install_directory: application/helm_charts
+helm_simulation_output_file: /tmp/helm_simu_output \ No newline at end of file
diff --git a/ansible/test/roles/prepare-application/tasks/main.yml b/ansible/test/roles/prepare-application/tasks/main.yml
new file mode 100644
index 00000000..2f143a07
--- /dev/null
+++ b/ansible/test/roles/prepare-application/tasks/main.yml
@@ -0,0 +1,47 @@
+---
+- name: Create Application helm charts directory
+ file:
+ path: "{{ app_helm_charts_install_directory }}"
+ state: directory
+ delegate_to: localhost
+
+- name: Create Makefile to simulate helm charts dir and make building
+ copy:
+ content: |
+ all:
+ onap:
+ dest: "{{ app_helm_charts_install_directory }}/Makefile"
+ delegate_to: localhost
+ when: simulate_helm
+
+- name: Clean previous simulation output file
+ file:
+ path: "{{ helm_simulation_output_file }}"
+ state: absent
+
+- name: simulate helm binary
+ copy:
+ content: |
+ #!/bin/bash
+ echo "$@" >> {{ helm_simulation_output_file }}
+ dest: "{{ helm_bin_dir }}/helm"
+ mode: 0755
+ when: simulate_helm
+
+- name: Install make
+ package:
+ name: make
+ state: present
+
+- name: Create local certs dir for dummy certs
+ file:
+ path: certs
+ state: directory
+ delegate_to: localhost
+
+- name: Create dummy cert file to simulate offline server certificates in helm install with override.yml file
+ copy:
+ content: |
+ this is dummy server certificate value
+ dest: certs/rootCA.crt
+ delegate_to: localhost