Merge "Add functional job with redis enabled"

This commit is contained in:
Zuul 2024-04-26 09:30:16 +00:00 committed by Gerrit Code Review
commit 448cf4136b
7 changed files with 60 additions and 0 deletions

View File

@ -16,6 +16,21 @@
override-checkout: main override-checkout: main
- name: openstack/oslo.db - 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: - project:
templates: templates:
- check-requirements - check-requirements
@ -28,6 +43,8 @@
check: check:
jobs: jobs:
- taskflow-tox-py310-with-sqlalchemy-2x - taskflow-tox-py310-with-sqlalchemy-2x
- taskflow-functional-redis
gate: gate:
jobs: jobs:
- taskflow-tox-py310-with-sqlalchemy-2x - taskflow-tox-py310-with-sqlalchemy-2x
- taskflow-functional-redis

View File

@ -15,3 +15,7 @@ mysql-server [platform:dpkg !platform:debian]
postgresql postgresql
postgresql-client [platform:dpkg] postgresql-client [platform:dpkg]
libpq-dev [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]

View File

@ -0,0 +1,5 @@
---
backend_services_map:
redis:
- redis-server
- redis-sentinel

View File

@ -0,0 +1,5 @@
---
backend_services_map:
redis:
- redis
- redis-sentinel

View 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] }}"

View File

@ -29,5 +29,6 @@ oslotest>=3.2.0 # Apache-2.0
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
testscenarios>=0.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0
pre-commit>=2.6.0 # MIT pre-commit>=2.6.0 # MIT

View File

@ -23,6 +23,13 @@ commands =
sphinx-build -E -W -b html doc/source doc/build/html sphinx-build -E -W -b html doc/source doc/build/html
doc8 doc/source 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] [testenv:update-states]
deps = deps =
{[testenv]deps} {[testenv]deps}