mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
Cleanup functional tests
Use the openstacksdk base functional test instead of going all the way back to devstack for our base. Also - defining a job starting with openstacksdk in this repo is not ok - but that probably just came from the original copy-pasta coming from the sdk repo. Use tox-siblings more and stop doing tox requirements of ../ things. The system is there and we can use it. Add jobs to test against released openstacksdk and ansible, as well as a non-voting to test against ansible devel branch. Add openstacksdk to the test-requirements because it's super required. Move zuul.yaml to .zuul.yaml. This isn't a zuul jobs repo so we should just make it a hidden file rather than a non-hidden. Change-Id: I658bd1728629cd358bc17a7f00d282d04530d8fe
This commit is contained in:
committed by
Sagi Shnaidman
parent
75cc5012e3
commit
cf7011a742
49
.zuul.yaml
Normal file
49
.zuul.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# yamllint disable
|
||||||
|
---
|
||||||
|
- job:
|
||||||
|
name: ansible-collections-openstack-functional-devstack
|
||||||
|
parent: openstacksdk-functional-devstack
|
||||||
|
description: |
|
||||||
|
Run openstack collections functional tests against a master devstack
|
||||||
|
using master of openstacksdk with latest ansible release
|
||||||
|
vars:
|
||||||
|
zuul_work_dir: src/opendev.org/openstack/ansible-collections-openstack
|
||||||
|
tox_envlist: ansible
|
||||||
|
tox_install_siblings: true
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-collections-openstack-functional-devstack-releases
|
||||||
|
parent: ansible-collections-openstack-functional-devstack
|
||||||
|
description: |
|
||||||
|
Run openstack collections functional tests against a master devstack
|
||||||
|
using releases of openstacksdk and latest ansible release
|
||||||
|
vars:
|
||||||
|
tox_install_siblings: false
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
|
parent: ansible-collections-openstack-functional-devstack
|
||||||
|
description: |
|
||||||
|
Run openstack collections functional tests against a master devstack
|
||||||
|
using master of openstacksdk and devel branch of ansible
|
||||||
|
# non-voting because we can't prevent ansible devel from breaking us
|
||||||
|
voting: false
|
||||||
|
required-projects:
|
||||||
|
- name: github.com/ansible/ansible
|
||||||
|
override-checkout: devel
|
||||||
|
|
||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- tox-pep8
|
||||||
|
- openstack-tox-linters
|
||||||
|
- ansible-collections-openstack-functional-devstack
|
||||||
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- tox-pep8
|
||||||
|
- openstack-tox-linters
|
||||||
|
- ansible-collections-openstack-functional-devstack
|
||||||
|
- ansible-collections-openstack-functional-devstack-releases
|
||||||
|
- ansible-collections-openstack-functional-devstack-ansible-devel
|
||||||
3
setup.cfg
Normal file
3
setup.cfg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[metadata]
|
||||||
|
# This is a stub file to enable tox-siblings to work
|
||||||
|
name = ansible-collections-openstack
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
pbr
|
|
||||||
ansible
|
ansible
|
||||||
|
openstacksdk
|
||||||
pycodestyle
|
pycodestyle
|
||||||
flake8
|
flake8
|
||||||
pylint
|
pylint
|
||||||
|
|||||||
4
tox.ini
4
tox.ini
@@ -56,12 +56,10 @@ ignore = W503,H4,E501,E402,H301
|
|||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||||
|
|
||||||
[testenv:ansible-new]
|
[testenv:ansible]
|
||||||
# Need to pass some env vars for the Ansible playbooks
|
# Need to pass some env vars for the Ansible playbooks
|
||||||
passenv = HOME USER ANSIBLE_VAR_*
|
passenv = HOME USER ANSIBLE_VAR_*
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
{toxinidir}/../openstacksdk
|
|
||||||
ansible
|
|
||||||
commands =
|
commands =
|
||||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||||
|
|||||||
72
zuul.yaml
72
zuul.yaml
@@ -1,72 +0,0 @@
|
|||||||
# yamllint disable
|
|
||||||
---
|
|
||||||
- job:
|
|
||||||
name: openstacksdk-functional-devstack-collections
|
|
||||||
parent: devstack-tox-functional
|
|
||||||
description: |
|
|
||||||
Minimum job for devstack-based functional tests
|
|
||||||
post-run: ci/playbooks/devstack/post.yaml
|
|
||||||
required-projects:
|
|
||||||
- openstack/os-client-config
|
|
||||||
- openstack/openstacksdk
|
|
||||||
- openstack/ansible-collections-openstack
|
|
||||||
timeout: 9000
|
|
||||||
vars:
|
|
||||||
devstack_plugins:
|
|
||||||
neutron: https://opendev.org/openstack/neutron
|
|
||||||
#heat: https://opendev.org/openstack/heat
|
|
||||||
devstack_local_conf:
|
|
||||||
post-config:
|
|
||||||
$CINDER_CONF:
|
|
||||||
DEFAULT:
|
|
||||||
osapi_max_limit: 6
|
|
||||||
devstack_localrc:
|
|
||||||
Q_ML2_PLUGIN_EXT_DRIVERS: qos,port_security
|
|
||||||
DISABLE_AMP_IMAGE_BUILD: true
|
|
||||||
Q_SERVICE_PLUGIN_CLASSES: qos,trunk
|
|
||||||
devstack_services:
|
|
||||||
# sdk doesn't need vnc access
|
|
||||||
n-cauth: false
|
|
||||||
n-novnc: false
|
|
||||||
# sdk testing uses config drive only
|
|
||||||
n-api-meta: false
|
|
||||||
q-meta: false
|
|
||||||
neutron-qos: true
|
|
||||||
neutron-trunk: true
|
|
||||||
neutron-port-forwarding: true
|
|
||||||
tox_environment:
|
|
||||||
# Do we really need to set this? It's cargo culted
|
|
||||||
PYTHONUNBUFFERED: 'true'
|
|
||||||
# Is there a way we can query the localconf variable to get these
|
|
||||||
# rather than setting them explicitly?
|
|
||||||
OPENSTACKSDK_HAS_DESIGNATE: 0
|
|
||||||
OPENSTACKSDK_HAS_HEAT: 0
|
|
||||||
OPENSTACKSDK_HAS_MAGNUM: 0
|
|
||||||
OPENSTACKSDK_HAS_NEUTRON: 1
|
|
||||||
OPENSTACKSDK_HAS_SWIFT: 1
|
|
||||||
tox_install_siblings: false
|
|
||||||
tox_envlist: ansible
|
|
||||||
zuul_copy_output:
|
|
||||||
'{{ ansible_user_dir }}/ansible_logs': logs
|
|
||||||
zuul_work_dir: src/opendev.org/openstack/ansible-collections-openstack
|
|
||||||
|
|
||||||
- job:
|
|
||||||
name: ansible-collections-openstack-functional-devstack
|
|
||||||
parent: openstacksdk-functional-devstack-collections
|
|
||||||
description: |
|
|
||||||
Run openstacksdk ansible functional tests against a master devstack
|
|
||||||
using Openstack collections
|
|
||||||
vars:
|
|
||||||
tox_envlist: ansible-new
|
|
||||||
|
|
||||||
- project:
|
|
||||||
check:
|
|
||||||
jobs:
|
|
||||||
- tox-pep8
|
|
||||||
- openstack-tox-linters
|
|
||||||
- ansible-collections-openstack-functional-devstack
|
|
||||||
gate:
|
|
||||||
jobs:
|
|
||||||
- tox-pep8
|
|
||||||
- openstack-tox-linters
|
|
||||||
- ansible-collections-openstack-functional-devstack
|
|
||||||
Reference in New Issue
Block a user