From 08f547be5c23ba616f47c08b4e1b0ca324a471bd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 11 Feb 2019 20:34:54 +0100 Subject: [PATCH] Fix tests - Add bindep.txt tec Our tests need to compile some packages, add binary dependencies. The list is the same as used for openstack-zuul-jobs. Add tests files to pass the syntax checks. Adjust test invocation to pass fake values to variables. Change-Id: I7368990628086a03501c432b86ace48fb7a50ba5 --- bindep.txt | 16 ++++++++++++++++ tests/inventory | 2 ++ tests/vars.yaml | 2 ++ tox.ini | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 bindep.txt create mode 100644 tests/inventory create mode 100644 tests/vars.yaml diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..116e2ba --- /dev/null +++ b/bindep.txt @@ -0,0 +1,16 @@ +# This is a cross-platform list tracking distribution packages needed by tests; +# see http://docs.openstack.org/infra/bindep/ for additional information. + +libffi-devel [test platform:rpm] +libffi-dev [test platform:dpkg] +libssl-dev [platform:dpkg] +openssl-devel [platform:rpm] +python3-dev [compile test platform:dpkg platform:apk] +python3-devel [compile test platform:rpm] +libre2-dev [compile test platform:dpkg] +libre2-4 [platform:ubuntu-bionic] +libre2-3 [platform:debian-stretch] +libre2-1v5 [platform:ubuntu-xenial] +re2-devel [compile test platform:rpm] +re2-dev [platform:apk] +re2 [platform:rpm platform:apk] diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..68b2dac --- /dev/null +++ b/tests/inventory @@ -0,0 +1,2 @@ +[all] +localhost diff --git a/tests/vars.yaml b/tests/vars.yaml new file mode 100644 index 0000000..383a9de --- /dev/null +++ b/tests/vars.yaml @@ -0,0 +1,2 @@ +site_logs: + fqdn: fake diff --git a/tox.ini b/tox.ini index 03a1ae4..4e0e69e 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,8 @@ commands = xargs -t -n1 ansible-lint -xANSIBLE0012' # Ansible Syntax Check bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \ - ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null" + ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \ + -e @tests/vars.yaml \{\} + > /dev/null" [testenv:venv] commands = {posargs}