Skip to content

Commit

Permalink
Enable placeholder openstack-tox-molecule job
Browse files Browse the repository at this point in the history
This sets the molecule framework files and job, so later we can write
tests for the role using it.

Change-Id: I16a67ff8acbadc7dce3746ca2ffc67aed660ed65
  • Loading branch information
ssbarnea committed Mar 30, 2020
1 parent f5e2828 commit 3f4b58b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 5 deletions.
10 changes: 10 additions & 0 deletions molecule/default/converge.yml
@@ -0,0 +1,10 @@
---

- name: Converge
hosts: all
gather_facts: false
tasks:

- name: this does nothing
debug:
msg: foo
11 changes: 11 additions & 0 deletions molecule/default/molecule.yml
@@ -0,0 +1,11 @@
---
driver:
name: delegated
log: true
platforms:
- name: localhost
provisioner:
name: ansible
scenario:
test_sequence:
- converge
39 changes: 34 additions & 5 deletions tox.ini
@@ -1,7 +1,7 @@
[tox]
minversion = 3.1
skipsdist = True
envlist = docs,linters,functional
envlist = docs,linters,functional,molecule
ignore_basepython_conflict = True

[testenv]
Expand All @@ -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}
Expand Down Expand Up @@ -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}
5 changes: 5 additions & 0 deletions zuul.d/project.yaml
Expand Up @@ -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:
Expand Down

0 comments on commit 3f4b58b

Please sign in to comment.