From a95db6e3bc488befb4ee9d8d5c719eb044b99d41 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 17 Jul 2017 16:08:40 +0100 Subject: [PATCH 1/3] Add a tox target for testing against openstack placement The openstack placement service is one of the larger consumers of gabbi. This change adds a 'placement' tox target get retrieves the latest code that provides placement and runs the relevant gabbi tests against it. The target is added to the "allowed to fail" section travis. This is considerably more complex than the gnocchi target (which does a similar thing) because this gets the master tarball rather than cloning the git repo. The clone takes far too long because the curren thost of the placement service, nova, is very large and very old. --- .travis.yml | 1 + tox.ini | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 870cc94..4cbb377 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ matrix: env: TOXENV=py36-pytest allow_failures: - env: TOXENV=gnocchi + - env: TOXENV=placement notifications: irc: "chat.freenode.net#gabbi" diff --git a/tox.ini b/tox.ini index 63f4306..9940e18 100644 --- a/tox.ini +++ b/tox.ini @@ -63,6 +63,21 @@ commands = tox -e py27-gabbi --notest # ensure a virtualenv is built {envdir}/src/gnocchi/.tox/py27-gabbi/bin/pip install -U {toxinidir} # install gabbi tox -e py27-gabbi +[testenv:placement] +basepython = python2.7 +deps = tox +commands = -mkdir {envdir}/src + -rm -r {envdir}/src/* + curl -o {envdir}/src/nova.tar.gz https://tarballs.openstack.org/nova/nova-master.tar.gz + tar -C {envdir}/src -zxv --strip-components 1 -f nova.tar.gz + tox -c {envdir}/src -e functional --notest # ensure a virtualenv is built + {envdir}/src/.tox/functional/bin/pip install -U {toxinidir} # install gabbi + tox -c {envdir}/src -e functional test_placement_api +whitelist_externals = + mkdir + curl + tar + [testenv:docs] commands = rm -rf doc/build From 2abf4c4eca1a83c171c0abe6f4d854ad8c834e7a Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 17 Jul 2017 16:38:11 +0100 Subject: [PATCH 2/3] Actually run the placement tox target Saying it can is not enough. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4cbb377..07beac5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ matrix: - env: TOXENV=pep8 - env: TOXENV=py27-pytest - env: TOXENV=gnocchi + - env: TOXENV=placement - python: 3.5 env: TOXENV=py35 - python: 3.5 From 8db407b2f1cc01aebf4f8dec8765b90401e90d7c Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 17 Jul 2017 17:04:48 +0100 Subject: [PATCH 3/3] curl to tar to avoid the file having a location At least in travis it wasn't landing where expected so when trying to expand the archive a failure would occur. --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 9940e18..1bf470b 100644 --- a/tox.ini +++ b/tox.ini @@ -68,8 +68,7 @@ basepython = python2.7 deps = tox commands = -mkdir {envdir}/src -rm -r {envdir}/src/* - curl -o {envdir}/src/nova.tar.gz https://tarballs.openstack.org/nova/nova-master.tar.gz - tar -C {envdir}/src -zxv --strip-components 1 -f nova.tar.gz + bash -c "curl https://tarballs.openstack.org/nova/nova-master.tar.gz | tar -C {envdir}/src -zxv --strip-components 1 -f - " tox -c {envdir}/src -e functional --notest # ensure a virtualenv is built {envdir}/src/.tox/functional/bin/pip install -U {toxinidir} # install gabbi tox -c {envdir}/src -e functional test_placement_api @@ -77,6 +76,8 @@ whitelist_externals = mkdir curl tar + rm + bash [testenv:docs] commands =