Enable molecule placeholder test

A follow-up will also add effective testing of the role, as it requires
additional changes.

Change-Id: I89b41cb0762ba063dc4e2f1d4042d1261fa1e8de
This commit is contained in:
Sorin Sbarnea 2020-01-09 15:38:20 +01:00
parent 7003294484
commit 5b8cd3a203
7 changed files with 72 additions and 1 deletions

View File

@ -1,3 +1,22 @@
--- ---
galaxy_info:
author: Red Hat
description: |
An Ansible role for generating custom RPMSs from upstream Gerrit changes in
the TripleO project using DLRN. This repo then can be injected in the tested
environment, a repo file created and a yum update should start using the
built RPMs.
license: Apache
platforms:
- name: CentOS
versions:
- 7
- 8
- name: EL
versions:
- 7
- 8
min_ansible_version: 2.8
dependencies: dependencies:
- extras-common - extras-common

View File

@ -0,0 +1,21 @@
---
driver:
name: docker
log: true
lint:
enabled: false
platforms:
- name: instance
image: centos:7
provisioner:
name: ansible
log: true
env:
# ANSIBLE_STDOUT_CALLBACK: yaml
# hack to make it find 'common' role from tq
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${MOLECULE_SCENARIO_DIRECTORY}/../../../../../tripleo-quickstart/roles"
verifier:
name: ansible
lint:
name: ansible-lint

View File

@ -0,0 +1,3 @@
---
- name: Converge
hosts: all

View File

@ -0,0 +1,3 @@
---
- name: Verify
hosts: all

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = tripleo-quickstart-extras name = tripleo-quickstart-extras
summary = Extend tripleo-quickstart's abilities to deploy and test TripleO summary = "Extend tripleo-quickstart's abilities to deploy and test TripleO"
description-file = description-file =
README.rst README.rst
author = OpenStack author = OpenStack
@ -48,3 +48,7 @@ skip_changelog = True
show-source = True show-source = True
ignore = E123,E125,E402,E501,F403,H303,H301,F405 ignore = E123,E125,E402,E501,F403,H303,H301,F405
builtins = _ builtins = _
[tool:pytest]
# these break pytest collection due to missing imports
norecursedirs = .tox .eggs roles/validate-tempest/files

15
tox.ini
View File

@ -49,3 +49,18 @@ commands =
[testenv:venv] [testenv:venv]
basepython = python3 basepython = python3
commands = {posargs} commands = {posargs}
[testenv:molecule]
deps =
ansible
ansi2html # GPL (soft-dependency of pytest-html)
docker
paramiko>=2.5.0 # LGPL (soft-dependency of docker that enables ssh protocol)
pytest-cov # MIT
pytest-html # MPL 2.0
pytest-molecule<=1.2.3 # MIT
selinux # MIT
mock
molecule>=3.0a4
commands =
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html -rA --molecule-unavailable-driver=fail {tty:-s} {posargs:-k 'molecule and docker'}

View File

@ -11,6 +11,9 @@
jobs: jobs:
- tripleo-ci-centos-7-standalone - tripleo-ci-centos-7-standalone
- openstack-tox-linters - openstack-tox-linters
- openstack-tox-molecule:
required-projects:
- openstack/tripleo-quickstart
- tripleo-ci-centos-7-containers-undercloud-minion: - tripleo-ci-centos-7-containers-undercloud-minion:
files: files:
- ^roles/.*minion.*$ - ^roles/.*minion.*$
@ -19,3 +22,6 @@
queue: tripleo queue: tripleo
jobs: jobs:
- openstack-tox-linters - openstack-tox-linters
- openstack-tox-molecule:
required-projects:
- openstack/tripleo-quickstart