Add functional test with etcd
Change-Id: I43606301c053c937333ab1454eca5f627682d085
This commit is contained in:
parent
f0fd57a863
commit
c62d95d424
4
.gitignore
vendored
4
.gitignore
vendored
@ -66,3 +66,7 @@ env
|
||||
RELEASENOTES.rst
|
||||
releasenotes/notes/reno.cache
|
||||
releasenotes/build
|
||||
|
||||
# Generated by etcd
|
||||
etcd-v*
|
||||
default.etcd
|
||||
|
10
.zuul.yaml
10
.zuul.yaml
@ -31,6 +31,14 @@
|
||||
tox_environment:
|
||||
PIFPAF_DAEMON: redis
|
||||
|
||||
- job:
|
||||
name: taskflow-functional-etcd
|
||||
parent: taskflow-functional
|
||||
vars:
|
||||
tox_environment:
|
||||
PIFPAF_DAEMON: etcd
|
||||
SETUP_ENV_SCRIPT: ./setup-etcd-env.sh
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
@ -44,7 +52,9 @@
|
||||
jobs:
|
||||
- taskflow-tox-py310-with-sqlalchemy-2x
|
||||
- taskflow-functional-redis
|
||||
- taskflow-functional-etcd
|
||||
gate:
|
||||
jobs:
|
||||
- taskflow-tox-py310-with-sqlalchemy-2x
|
||||
- taskflow-functional-redis
|
||||
- taskflow-functional-etcd
|
||||
|
@ -3,3 +3,4 @@ backend_services_map:
|
||||
redis:
|
||||
- redis-server
|
||||
- redis-sentinel
|
||||
etcd: []
|
||||
|
@ -3,3 +3,4 @@ backend_services_map:
|
||||
redis:
|
||||
- redis
|
||||
- redis-sentinel
|
||||
etcd: []
|
||||
|
31
setup-etcd-env.sh
Executable file
31
setup-etcd-env.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
if [ -z "$(which etcd)" ]; then
|
||||
ETCD_VERSION=3.3.27
|
||||
case `uname -s` in
|
||||
Darwin)
|
||||
OS=darwin
|
||||
SUFFIX=zip
|
||||
;;
|
||||
Linux)
|
||||
OS=linux
|
||||
SUFFIX=tar.gz
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported OS"
|
||||
exit 1
|
||||
esac
|
||||
case `uname -m` in
|
||||
x86_64)
|
||||
MACHINE=amd64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported machine"
|
||||
exit 1
|
||||
esac
|
||||
TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
|
||||
test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
|
||||
export PATH=$PATH:$TARBALL_NAME
|
||||
fi
|
||||
|
||||
$*
|
3
tox.ini
3
tox.ini
@ -26,9 +26,10 @@ commands =
|
||||
[testenv:functional]
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
pifpaf -e TAKSFLOW_TEST run {env:PIFPAF_DAEMON} {env:PIFPAF_OPTS} -- stestr run
|
||||
{env:SETUP_ENV_SCRIPT} pifpaf -e TAKSFLOW_TEST run {env:PIFPAF_DAEMON} {env:PIFPAF_OPTS} -- stestr run
|
||||
allowlist_externals =
|
||||
find
|
||||
./setup-etcd-env.sh
|
||||
|
||||
[testenv:update-states]
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user