Commit Graph

15 Commits

Author SHA1 Message Date
wu.chunyang 93f35c7f04 Get rid of nose and Proboscis
they are not maintained for a long time, and trove already switch
the tests to templest.
This commit removes the usage of them. more details see story.

Story: 2010882
Task: 48606

Depends-On: https://review.opendev.org/c/openstack/trove/+/914228

Change-Id: Ie021e0bd708cf8ed13853dea632312af38190205
2024-03-28 07:07:15 +00:00
wangzihao e954184693 Remove six usage and basestring check
Remove basestring check.
Remove six Replace the following items with Python 3 style code.

- six.string_types
- six.int2byte
- six.indexbytes
- six.add_metaclass
- six.StringIO
- six.text_type
- six.integer_types
- six.binary_type
- six.BytesIO
- six.reraise

Change-Id: I4fb9033d152963c504ceb4d5c4d08f934ee4accb
2020-10-16 10:40:22 +08:00
likui 5bf159de36 Remove six.PY3
The Python 2.7 Support has been dropped since Ussuri.
So remove hacking rules for compatibility between python 2 and 3.

Change-Id: Id3fd78b5d3e21579975ea0d0fc65e4f66ea4582e
2020-09-03 18:30:24 +08:00
Hervé Beraud 816a7bca58 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I0adf51fb6a54c323c3d7a26ea62c23184a99933d
2020-06-02 21:06:08 +02:00
Lingxian Kong 602c4d42de Improve the function tests
- Execute test groups in serial to make sure no more than 2 database
  instance are created at the same time.
- Remove some unneccesary tests
- Remove unneeded datastore, e.g. 'Test_Datastore_1'
- Remove unsupported trovestack subcommands
- Move unsupported DIB elements to the 'deprecated-elements' folder
- Decrease default value of 'agent_call_high_timeout' to 5min
- Add initial_deplay for pooling task
- Use socket file to connect with database instead of using localhost
  IP

Change-Id: Ie5030a671fbeb453eafa6cbe04e08da7b52e33c9
2020-01-28 14:27:52 +13:00
Lingxian Kong dfa5ce93d5 Improve devmode=flase when building the image
During debugging, the following changes are also included:

- Support to specify an image ID to run the integration test.
- Fix the reboot function bug.
- Remove the unsuccessful restart test.

How to run integration test with dev_mode=false:

    ADMIN_PASSWORD=password \
    SERVICE_PASSWORD=password \
    DEV_MODE=false \
    /opt/stack/trove/integration/scripts/trovestack gate-tests mysql mysql

Change-Id: I31d4ee579a554f4c98f9facb9fd4b7779665a3dd
2019-08-25 23:11:54 +12:00
Marcin Piwowarczyk ad84829882 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I9ee34642c700d1e6ba9c2f3891b7fa1f7f7e1e1d
Depends-On: I8989fd4798e80eae27408017e1543819a68b4ab1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
2018-09-18 17:19:20 +00:00
Marcin Piwowarczyk 4b639ea43f Remove unused imports from the integration tests
Change-Id: I2295b9b9e0435bf459364c2dab7852cc9535edfe
Co-authored-by: wangqi <wang.qi@99cloud.net>
Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
2018-08-22 08:59:37 +02:00
Corey Bryant 08d581fd5c py3.x: Fix usage of gettext.install
This needed to be updated to get py3.x to work.

Change-Id: I987854c0266566e1e7722478dbb3e27bcffbb08b
Closes-Bug: #1777440
2018-06-19 10:06:35 -04:00
Samuel Matzek d7b773d2b0 Enable integration tests
Re-enable the integration tests.

Integration tests were temporarily disabled under
9ec134996a to avoid the
circular dependency with python-troveclient and allow
the merging of the python-troveclient changes necessary
to complete the fixing of the gates.

This also increases the TROVE_AGENT_CALL_HIGH_TIMEOUT to
help the upgrade test pass. The upgrade test has an agent call
that takes longer than the current timeout when running in
the gate on Nova compute with virt_type set as qemu.

Change-Id: I8459cd64cdf6107e537f4e7c793c3626fa4bf9f9
2017-10-19 06:23:16 -05:00
Samuel Matzek c4c0083f26 Fix integration test exception handling
Under 9ec134996a the exception
handling of the test_runners was changed to do a bare
raise of the original test failing exception. This was
done to preserve the original traceback. This had the
unintended side effect of allowing exceptions in the error
handling and log reporting code to be raised as the test
case failing exception.

This commit fixes the exception handling to save off the
exc_info and re-raise the original exception with original
traceback.

Change-Id: I13bcf194bb289749ec289216f2541d4923f5f2bf
2017-10-18 06:39:02 -05:00
Samuel Matzek 9ec134996a Fix gate issues
Issue 1:
The os-testr 1.0.0 release had a couple of required config changes due
to it's internal usage of stestr.

This change to stestr changed the way tests were discovered by
os-testr and as a result the unit test run was picking up tempest
tests.

A regex is added to the py3base environment call of ostestr because
the use of --serial and --blacklist-file together is broken in stestr
and adding the regex parameter allows the blacklist-file to be
processed. The stestr issue is documented here [1].

Issue 2:

Cache dirs for PKI tokens have been removed for all services in
devstack under I5680376e70e74882e9fdb87ee1b95d5f40570ad7.

We must also remove the use here to pass the right parameters to
configure_auth_token_middleware.

Issue 3:
Keystone V2 APIs have been removed.  When creating Nova and Glance
clients, the test code was either hard coding v2 Keystone or not
providing enough information for the V3 auth.

Issue 4:
Oslo context has deprecated parameters such as 'tenant', has removed
them from its constructor and is using a rename decorator to handle
them. As such, the code and test case to check for unrecognized
parameters to TroveContext and Context is erroneously removing the
tenant parameter.  Oslo context has also changed the from_dict method
since the original code to remove parameters was introduced into
Trove. The new method signature and code should already provide most
or all of the protections against incompatibility the original code
was attempting to provide. The fix for this issue is to change
TroveContext's from_dict method to use the kwargs to handle its own
__init__ parameters and be more in line with what Nova is doing in
its RequestContext subclass.

Issue 5:
Jobs run as jenkins on Zuul v2 but run as user zuul on Zuul v3.

Issue 6:
Ignore one case of pylint E1101 in the Ceilometer notification
code base.

[1] https://github.com/mtreinish/stestr/issues/103

Change-Id: Ic55187b0d73d4c572d7f8332882b4f455a6177c8
2017-10-13 09:37:48 -05:00
pangliye 015b2b02dd Trivial: Remove vim header from source files
Change-Id: Id27a73c58e8a0622329f17af86ffda30e7d0aea9
Trivial: Remove vim header from source files
2016-12-20 22:43:45 -05:00
Amrith Kumar 490492b967 beginning to change trove-integration
This commit changes trove-integration and the artifacts that were
brought over from that repository and brings them into the trove
repository.

The things (specifically) done in this commit are:

1. get rid of .gitreview; this is no longer a repository of its own,
it is a part of the trove repository.

2. Update the readme (README.md)

3. Make the elements work in this directory structure

4. Rename the elements and get rid of the name 'reddwarf', change the
name redstack to trovestack

5. Refactor all scripts and make them reflect the new directory
structure.

Change-Id: Iae67fe231b6c7964ca3f31fc593fc9fa4111d5be
2016-10-10 20:30:05 -04:00
Amrith Kumar b120be1772 Merge trove-integration into trove
This commit will merge into trove, the trove-integration tree as of
commit 9f92ca853f8aa2f72921e54682c918941a8f0919. This is in
preparation for making trove-integration go away.

In addition, it supresses any consideration of the integration
directory in the trove tox tests as it is understandably a small pile
of pooh and in need of much cleanup.

Change-Id: Ib7f2655c4c5ed86b5454708c04371ee55e37ec2d
Partially-Implements-Blueprint: eliminate-trove-integration-and-redstack
2016-10-09 07:14:25 -04:00