Merge "Add functional job with redis enabled"
This commit is contained in:
commit
448cf4136b
17
.zuul.yaml
17
.zuul.yaml
@ -16,6 +16,21 @@
|
||||
override-checkout: main
|
||||
- name: openstack/oslo.db
|
||||
|
||||
- job:
|
||||
name: taskflow-functional
|
||||
parent: openstack-tox
|
||||
abstract: true
|
||||
pre-run: playbooks/tests/functional/pre.yml
|
||||
vars:
|
||||
tox_envlist: functional
|
||||
|
||||
- job:
|
||||
name: taskflow-functional-redis
|
||||
parent: taskflow-functional
|
||||
vars:
|
||||
tox_environment:
|
||||
PIFPAF_DAEMON: redis
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
@ -28,6 +43,8 @@
|
||||
check:
|
||||
jobs:
|
||||
- taskflow-tox-py310-with-sqlalchemy-2x
|
||||
- taskflow-functional-redis
|
||||
gate:
|
||||
jobs:
|
||||
- taskflow-tox-py310-with-sqlalchemy-2x
|
||||
- taskflow-functional-redis
|
||||
|
@ -15,3 +15,7 @@ mysql-server [platform:dpkg !platform:debian]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
libpq-dev [platform:dpkg]
|
||||
|
||||
redis [platform:rpm tests-functional-redis]
|
||||
redis-server [platform:dpkg tests-functional-redis]
|
||||
redis-sentinel [platform:dpkg tests-functional-redis]
|
||||
|
5
playbooks/tests/functional/Debian.yaml
Normal file
5
playbooks/tests/functional/Debian.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
backend_services_map:
|
||||
redis:
|
||||
- redis-server
|
||||
- redis-sentinel
|
5
playbooks/tests/functional/RedHat.yaml
Normal file
5
playbooks/tests/functional/RedHat.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
backend_services_map:
|
||||
redis:
|
||||
- redis
|
||||
- redis-sentinel
|
21
playbooks/tests/functional/pre.yml
Normal file
21
playbooks/tests/functional/pre.yml
Normal file
@ -0,0 +1,21 @@
|
||||
- hosts: all
|
||||
vars:
|
||||
taskflow_backend_daemon: "{{ tox_environment.PIFPAF_DAEMON }}"
|
||||
roles:
|
||||
- role: bindep
|
||||
bindep_profile: "tests-functional-{{ taskflow_backend_daemon }}"
|
||||
tasks:
|
||||
- name: Include OS-specific variables
|
||||
include_vars: "{{ ansible_os_family }}.yaml"
|
||||
# NOTE(yoctozepto): Debian and Ubuntu have this nasty policy of starting
|
||||
# installed services for us. We don't rely on system-wide service and use
|
||||
# pifpaf. Unfortunately, default port may conflict with system-wide service.
|
||||
# So, for sanity and resource conservation, let's stop it before tests run.
|
||||
- name: "Stop backend services"
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
become: yes
|
||||
loop: "{{ backend_services_map[taskflow_backend_daemon] }}"
|
||||
|
@ -29,5 +29,6 @@ oslotest>=3.2.0 # Apache-2.0
|
||||
testtools>=2.2.0 # MIT
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
pifpaf>=0.10.0 # Apache-2.0
|
||||
|
||||
pre-commit>=2.6.0 # MIT
|
||||
|
7
tox.ini
7
tox.ini
@ -23,6 +23,13 @@ commands =
|
||||
sphinx-build -E -W -b html doc/source doc/build/html
|
||||
doc8 doc/source
|
||||
|
||||
[testenv:functional]
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
pifpaf -e TAKSFLOW_TEST run {env:PIFPAF_DAEMON} {env:PIFPAF_OPTS} -- stestr run
|
||||
allowlist_externals =
|
||||
find
|
||||
|
||||
[testenv:update-states]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
|
Loading…
Reference in New Issue
Block a user