Use pypi released version of placement in functional tests

osc-placement functional tests are using the master version
of placement which is failing due to the constraints mismatch
on stable branches testing.

- https://zuul.opendev.org/t/openstack/build/a2cc830f28f44ed5ae0e1c5f0a99ac75

During the discussion in Nova meeting, we did not find any reason why
we are using the latest placement on stable branch testing of osc-placement
- https://meetings.opendev.org/meetings/nova/2023/nova.2023-01-10-16.00.log.html#l-47

Below is the original patch which started using the placement from master
source.
- https://review.opendev.org/c/openstack/osc-placement/+/651939

To avoid the constraints mismatch on stable branch testing which can
happen in future also, let's use it from pypi version which will be the
same way as nova functional tests doing
- 26f24b7086/tox.ini (L64)

During this backport, removing basepython changes are not applicable on stable as we have
pinned stable branches for tox<4.

Change-Id: I4e3e5732411639054baaa9211a29e2e2c8210ac0
(cherry picked from commit 90ecfa92f0)
This commit is contained in:
Ghanshyam Mann 2023-01-10 13:18:02 -06:00 committed by Ghanshyam
parent 8a325503d0
commit d4036554f0
1 changed files with 15 additions and 1 deletions

16
tox.ini
View File

@ -25,9 +25,23 @@ commands = stestr run {posargs}
[testenv:functional]
description =
Run functional tests using python3.
# As osc-placement functional tests import the PlacementFixture from the placement
# repository these tests are, by default, set up to run with openstack-placement
# from pypi. In the gate, Zuul will use the installed version of placement (stable
# branch version on stable gate run) OR the version of placement the Depends-On in
# the commit message suggests. If you want to run the tests with latest master from
# the placement repo, modify the dep line to point at master, example:
# deps =
# {[testenv]deps}
# git+https://opendev.org/openstack/placement#egg=openstack-placement
# If you want to run the test locally with an un-merged placement change,
# modify the dep line to point to your dependency or pip install placement
# into the appropriate tox virtualenv.
# NOTE: We express the requirement here instead of test-requirements
# because we do not want placement present during unit tests.
deps =
{[testenv]deps}
git+https://opendev.org/openstack/placement.git#egg=openstack-placement
openstack-placement>=1.0.0
commands = stestr --test-path=./osc_placement/tests/functional run {posargs}
[testenv:functional-py38]