Enable placeholder openstack-tox-molecule job

This sets the molecule framework files and job, so later we can write
tests for the role using it.

Change-Id: I16a67ff8acbadc7dce3746ca2ffc67aed660ed65
This commit is contained in:
Sorin Sbarnea 2019-07-23 18:18:40 +01:00
parent f5e2828e52
commit 3f4b58bd41
4 changed files with 60 additions and 5 deletions

View File

@ -0,0 +1,10 @@
---
- name: Converge
hosts: all
gather_facts: false
tasks:
- name: this does nothing
debug:
msg: foo

View File

@ -0,0 +1,11 @@
---
driver:
name: delegated
log: true
platforms:
- name: localhost
provisioner:
name: ansible
scenario:
test_sequence:
- converge

39
tox.ini
View File

@ -1,7 +1,7 @@
[tox]
minversion = 3.1
skipsdist = True
envlist = docs,linters,functional
envlist = docs,linters,functional,molecule
ignore_basepython_conflict = True
[testenv]
@ -12,21 +12,34 @@ install_command =
commands =
/usr/bin/find . -type f -name "*.pyc" -delete
passenv =
ANSIBLE_*
COMMON_TESTS_PATH
DOCKER_*
HOME
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
HTTP_PROXY
MOLECULE_*
NO_PROXY
SSH_AUTH_SOCK
TERM
TESTING_BRANCH
TESTING_HOME
USER
http_proxy
https_proxy
no_proxy
whitelist_externals =
bash
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
ANSIBLE_INVENTORY=
ANSIBLE_CONFIG=
MOLECULE_NO_LOG={env:MOLECULE_NO_LOG:0}
PYTHONUNBUFFERED=1
PY_COLORS=1
ROLE_NAME=os_tempest
TEST_IDEMPOTENCE=false
VIRTUAL_ENV={envdir}
@ -101,3 +114,19 @@ commands =
{[testenv:bashate]commands}
{[testenv:ansible-lint]commands}
{[testenv:ansible-syntax]commands}
[testenv:molecule]
setenv =
UPPER_CONSTRAINTS_FILE=/dev/null
deps =
ansi2html # GPL (soft-dependency of pytest-html)
docker>=3.7 # Apache
molecule>=3.0.2 # MIT
paramiko>=2.5.0 # LGPL (soft-dependency of docker that enables ssh protocol)
pytest # MIT
pytest-html # MPL 2.0
pytest-molecule # MIT
pytest-plus # MIT
selinux # MIT
commands =
python -m pytest -ra --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs:-k molecule}

View File

@ -24,6 +24,11 @@
check:
jobs:
- openstack-ansible-deploy-aio_distro_metal_tempestconf-centos-7
- openstack-tox-molecule:
voting: false
vars:
tox_environment:
PYTEST_REQPASS: 1
- tripleo-ci-centos-8-standalone
gate:
jobs: