summaryrefslogtreecommitdiffstats
path: root/ansible/test/play-infrastructure/molecule/default/molecule.yml
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-04-21 19:24:18 +0300
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-05-29 10:44:06 +0000
commit2353ca7b38acbd7246adbf23b7d92723bc083dcf (patch)
tree577e2a90e67954778f757d1a25bab2eaaba9d4e4 /ansible/test/play-infrastructure/molecule/default/molecule.yml
parent14f47a0f47990a7e51123fcabd6c124285ebdc45 (diff)
Molecule test for infrastructure playbook.
These tests execute the whole infrastructure playbook. Issue-ID: OOM-1816 Change-Id: I793191e05cb0b527c3da6d820c1916231e69d865 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com> Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/test/play-infrastructure/molecule/default/molecule.yml')
-rw-r--r--ansible/test/play-infrastructure/molecule/default/molecule.yml73
1 files changed, 73 insertions, 0 deletions
diff --git a/ansible/test/play-infrastructure/molecule/default/molecule.yml b/ansible/test/play-infrastructure/molecule/default/molecule.yml
new file mode 100644
index 00000000..894ab804
--- /dev/null
+++ b/ansible/test/play-infrastructure/molecule/default/molecule.yml
@@ -0,0 +1,73 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint:
+ name: yamllint
+platforms:
+ - name: infrastructure-server
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ privileged: true
+ override_command: false
+ restart_policy: unless-stopped
+ volumes:
+ - /var/lib/docker
+ - /opt/onap
+ groups:
+ - infrastructure
+ networks:
+ - name: infrastructure-net
+ purge_networks: true
+
+ - name: kubernetes-node-1
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ privileged: true
+ override_command: false
+ restart_policy: unless-stopped
+ env:
+ container: docker
+ volumes:
+ - /var/lib/docker
+ groups:
+ - kubernetes
+ networks:
+ - name: infrastructure-net
+ purge_networks: true
+
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../roles:../../../../roles/
+ ANSIBLE_LIBRARY: ../../../../library
+ inventory:
+ links:
+ group_vars: ../../../../group_vars
+ lint:
+ name: ansible-lint
+scenario:
+ name: default
+ test_sequence:
+ - lint
+ - cleanup
+ - destroy
+ - dependency
+ - syntax
+ - create
+ - prepare
+ - converge
+ # - idempotence
+ # --> Action: 'idempotence'
+ # ERROR: Idempotence test failed because of the following tasks:
+ # * [infrastructure-server -> 10.0.2.15] => certificates : Generate an OpenSSL CSR.
+ # * [infrastructure-server -> 10.0.2.15] => certificates : Generate root CA certificate
+ - side_effect
+ - verify
+ - cleanup
+ - destroy
+verifier:
+ name: testinfra
+ lint:
+ name: flake8