Commit Graph

7 Commits

Author SHA1 Message Date
Matthew Treinish 9c56c78513
Finish stestr migration
Nova switched to using stestr for all it's in tree testing except for
the coverage job. This commit updates that job so it also uses stestr
and cleans up the last bits of testr setup left in tree. As part of
this change this moves all the one off per job configuration into the
tox job definitions instead of hiding it in either the .stestr.conf or
in a wrapper script.

Change-Id: I36e0e791d485b44641a1ed8770eca8e95aca19be
2017-11-24 16:51:12 -05:00
Chris Dent 26db00344f Remove invalid URL in gabbi tests
The use of a literal snowman in a URL is an invalid URL. In Python 3
the url parsing code used by gabbi will not accept this URL and
correctly rejects it. Python 2 is less strict and passes it on
(presumably encoding it somewhere in the stack).

Python 3's behavior is correct and the fact that the test ever
worked was an artifact of Python 2's bad behavior. The test
immediately following the removed test is testing the correct and
legitimate HTTP behavior, so it is best to just remove the bad one.

By doing so all functional tests pass under python3 so the
test-functional-py3.txt has been made empty, with a comment. This
was done, instead of removing it, to signal the state of affairs.

Change-Id: If40f5093c65491dcfc225dffd95c6dc1318a0f99
2017-01-17 21:10:45 +00:00
Davanum Srinivas c78a86c558 Fixes to get all functional tests working on py35
tests-functional-py3.txt:
* Remove all tests except snowman from blacklist
* snowman seems to be a gabbi problem under py35

nova/objects/resource_provider.py:
* Cannot compare None and integer under py35
* wrap keys() in a list before comparing to a list as
  keys() is an iterator

nova/virt/fake.py:
* list_instance_uuids should return a list, keys() returns
    an iterator.

nova/tests/functional/api_sample_tests/*.py:
* use response.text to compare with a string as response.context
  contains bytes under python3
* user_data should be strings not bytes, so convert them
  as necessary

nova/tests/functional/regressions/test_bug_1554631.py:
* cinder exceptions need the http code as the first parameter
  (not a string)
* use response.text to compare with a string as response.context
  contains bytes under python3

nova/tests/functional/test_servers.py:
* zlib.compress needs bytes

Change-Id: I73be94afbb02dac46467555a8469f222a69025da
2017-01-14 13:06:56 -05:00
Davanum Srinivas 584969aff1 [py35] Fixes to get rally scenarios working
Get nova.boot_server, nova.attach_volume, nova.detach_volume and
nova.delete_server working. Please see the following cinder review
for the experiment (see gate-rally-dsvm-py35-cinder-nv):
Id78b136ad15ac77717711ebcbb671c2f1dd3a10c

nova/api/openstack/placement/handlers:
* make sure we convert to bytes before we set the response.body

nova/tests/functional/db/api/test_migrations.py:
* range is an iterator and must be converted to a list

nova/tests/unit/virt/libvirt/test_driver.py:
nova/tests/unit/virt/libvirt/test_fakelibvirt.py:
nova/virt/libvirt/config.py:
nova/virt/libvirt/guest.py:
nova/virt/libvirt/host.py:
* libvirt API expects strings, some of the code paths ended up
  being bytes, so convert them to strings before calling libvirt

Finally, eliminated the tests that now started to pass from
tests-functional-py3.txt

Change-Id: Ib721442e9d83a3b9a7fe597f3886430449a9e684
2017-01-13 15:44:00 +00:00
Davanum Srinivas a42de05be2 Better black list for py35 tests
gate-nova-tox-db-functional-py35-ubuntu-xenial job has a 100%
failure rate, let's fixup the blacklist and then start working
on the failing tests.

Change-Id: I2b34abc432010b52784f03eff8af669e9c629506
2017-01-12 05:50:55 -05:00
ChangBo Guo(gcb) f516e5a0b1 Fix urllib.urlencode issue in functional tests on Python 3
The urllib, urllib2, and urlparse modules have been combined in the
urllib package in Python 3. The six.moves.urllib package is a
version-independent location for this functionality; its structure
mimics the structure of the Python 3 urllib package.

Partially-Implements: blueprint goal-python35

Change-Id: I423d334bd7d2be5fae19007ddb6408eca381a6bd
2016-12-23 17:13:54 +08:00
ChangBo Guo(gcb) 2738e25f7e Add Python 3.5 functional tests in tox.ini
Add Python 3.5 functional tests tox envlist, this is
needed by python 3.5 functional tests Jenkins job.

Change-Id: I1bba877fcc2c1f2140cbbba2bc6e6c20d7972615
2016-12-14 13:33:07 +08:00