Add molecule jobs to test the modules
Change-Id: I0b252e2fc7d34f54f739199bdce450b1bef8d20b
This commit is contained in:
parent
f482d7a6a6
commit
f1e7092812
|
@ -0,0 +1,4 @@
|
|||
# Used for testing to avoid using one from outside repository
|
||||
[defaults]
|
||||
# Avoid noise which can make debugging test failures harder
|
||||
deprecation_warnings=False
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
||||
- name: "Test yum_config repo"
|
||||
tripleo.repos.yum_config:
|
||||
type: repo
|
||||
name: appstream
|
||||
enabled: true
|
||||
tags:
|
||||
# TODO: fix yum_config to correctly report changed state and uncomment
|
||||
# the line below which disables molecule idemptotence test.
|
||||
- molecule-idempotence-notest
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: instance
|
||||
image: quay.io/centos/centos:stream8
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Example assertion
|
||||
assert:
|
||||
that: true
|
17
tox.ini
17
tox.ini
|
@ -7,7 +7,9 @@ requires =
|
|||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
setenv =
|
||||
ANSIBLE_FORCE_COLOR={tty:1:0}
|
||||
VIRTUAL_ENV={envdir}
|
||||
passenv =
|
||||
HOME
|
||||
deps =
|
||||
|
@ -81,6 +83,19 @@ commands =
|
|||
whitelist_externals =
|
||||
sh
|
||||
|
||||
[testenv:molecule]
|
||||
description = Used by all molecule jobs (tox-ansible)
|
||||
deps =
|
||||
ansible-core
|
||||
molecule>=3.3.0,<3.4.0 # bug with collection install
|
||||
molecule-docker
|
||||
usedevelop = False
|
||||
skip_install = true
|
||||
commands =
|
||||
ansible-galaxy collection install -v 'community.docker:>=1.8.0'
|
||||
ansible-galaxy collection install -v --force .
|
||||
molecule test
|
||||
|
||||
[flake8]
|
||||
ignore = H803
|
||||
show-source = True
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
vars:
|
||||
tox_envlist: pep8,packaging
|
||||
- openstack-tox-py39
|
||||
- tripleo-tox-molecule
|
||||
- tripleo-buildimage-overcloud-full-centos-8:
|
||||
dependencies: &deps_unit_lint_cprovider
|
||||
- openstack-tox-pep8
|
||||
|
|
Loading…
Reference in New Issue