Commit Graph

44 Commits (0ea2c01d757375d54aa9a9de34c2c9995bb48d13)

Author SHA1 Message Date
Matt Riedemann cac5115ecd Trivial docstring cleanup in TestServerAdvancedOps
The resize test was moved in commit
1df75ee502.

Change-Id: I8ab2bf3927a23574f5934d7339be983fbb590126
2018-04-25 16:17:03 -04:00
Matt Riedemann 1df75ee502 Move and update test_resize_volume_backed_server_confirm
There is a bug in nova where the libvirt driver incorrectly removes
the local guest files for the hypervisor from shared storage because
it does not realize the instance is volume-backed. Nova runs an NFS
CI job in the experimental queue but it's not failing on resize
tests because they aren't volume-backed, so to recreate the failure
and make sure we don't regress the fix, this test is added. Nova
also runs a Ceph job which applies here too.

This moves the existing scenario test to be a compute API test. The
test ID is maintained in case people are blacklisting it, but the
slow tag is dropped because it's not a particularly slow test and
if the slow tag is applied, it won't actually be run in the jobs
that we care about testing this, e.g. NFS and Ceph jobs.

The additional wrinkle of getting the console log after the resize
is what shows the failure when the bug is not fixed, so that's added
here.

Depends-On: I29fac80d08baf64bf69e54cf673e55123174de2a

Change-Id: Id7de5186b2ea0ff7af86d9950c69203914498d88
Related-Bug: #1728603
2017-11-13 23:03:31 +00:00
Andrea Frittoli cd36841ca2 Move test decorators to common
services and extension decorators are based on CONF and needed by
Tempest only, so moving them to tempest.common.
Since a few plugnis use them today, use debtcollector to avoid
breaking all dependencies.

Change-Id: Ibd52153d00b8e60fb8c89e38d94e358ddc787251
2017-08-23 17:09:33 +00:00
Jenkins a55be93c28 Merge "Remove skip condition when resize is enable" 2017-04-26 07:12:39 +00:00
Jordan Pittier 3b46d27c90 Move the `attr` decorator from test.py to tempest/lib
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `attr`
decorator.

Change-Id: Iaafbb112b6eee458089cc49918359a8a8d0485e2
2017-04-14 11:16:36 +02:00
Masayuki Igawa d91094deac
Remove skip condition when resize is enable
This commit removes the skip condition with flavor_ref and
flavor_ref_alt when the resize feature is enable. Because when
resize feature is enable, the flavor_ref and flavor_ref_alt should be
set properly, otherwise, it is a misconfiguration. So we should fail
but not skip at the situation.

And This commit also add a help message for the resize config to avoid
users confusing.

Change-Id: I8eab2e57eb77e7a1a8dae7ffd63ec95ae6a026c3
2017-04-12 17:35:18 +09:00
Jenkins 13ee2ca9aa Merge "Do not use skip_checks in TestServerAdvancedOps" 2017-03-28 04:13:22 +00:00
Sean Dague 49505df20f make -e full run tempest scenarios serially
The scenario tests end up generating a large load on target
environments. In most cases this means the whole system is running at
an extremely unrealisticly high load, and many of our scenario
failures are probably traceable back to this.

This classifies many more scenario tests as slow so that during normal
full runs they are not run, they are still accessible for running with
the tox -e all flag.

Selection based on https://ethercalc.openstack.org/nu56u2wrfb2b

Depends-on: Ia303773cabffc25d910cd1c0950d6739592bade6
Change-Id: I35cf4a77ff61d04ed8be58acff3edf47b1ae36f7
2017-03-03 20:50:46 +00:00
zhufl 7531e9848d Do not use skip_checks in TestServerAdvancedOps
if CONF.compute.flavor_ref_alt == CONF.compute.flavor_ref,
test_server_sequence_suspend_resume will be skipped unexpectedly,
so the skip judgement shouldn't be put in skip_checks.

Besides, if flavor_ref_alt is not set, the resize testcase should
also be skipped.

Change-Id: I6bc3680ffa8c440590e234ce17bb57f06b361d02
2017-02-28 17:59:20 +08:00
zhufl 96daca7133 Remove unnecessary show_server in TestServerAdvancedOps
In test_server_sequence_suspend_resume, show_server follows
wait_for_server_status which is meaningless, because in
wait_for_server_status if server didn't reach the expected
state, an exception will be raised.

This is to remove the unnecessary show_server and rearrange
the code so it can look clearer.

Change-Id: Ifbb3403cc68cf0ea4bd1f84e5972c74598c8d329
2017-02-22 17:59:56 +08:00
zhufl 13c9c893cc Make wait_until default as 'ACTIVE' in manager.create_server
All callings to manager.create_server pass wait_until='ACTIVE',
so this is to make wail_until default as 'ACTIVE', not None.

Change-Id: I630cf047ed419fbf0cc073b5984fa29b456da451
2017-02-10 14:53:20 +08:00
Ken'ichi Ohmichi c85a951881 Switch to decorators.idempotent_id on scenario
So many modules are using test.idempotent_id and this is for
switching to decorators.idempotent_id on scenario.

Change-Id: Ieae5a2ee6937ad4339aff531eadc5e4986d7ec42
Related-Bug: #1616913
2017-02-06 15:17:31 -08:00
Matt Riedemann 4982cde29f Revert "Skip test_resize_volume_backed_server_confirm for now"
This reverts commit 9d04249602.

Depends-On: I25f65bcc76b83f31a8fce77c2b751d2d167ffc7e

Change-Id: I086e59cc49cd5ab2edeae852add3211bec79d30b
Related-Bug: #1580625
2016-05-11 19:35:14 +00:00
Matt Riedemann 9d04249602 Skip test_resize_volume_backed_server_confirm for now
This test is basically new as of the last 24 hours and
breaks the ceph job which is gating on nova/cinder/glance/
os-brick/glance_store/gnocchi, so skip it based on the bug
for now.

Change-Id: I1f334f43175fe56bdbe6bd35655ce671df7600a7
Related-Bug: #1580625
2016-05-11 10:37:38 -04:00
Matt Riedemann 6506f90f13 Change scenario test 'test_resize_server_confirm'
test_server_advanced_ops.test_resize_server_confirm is a duplicate
of test_server_actions.test_resize_server_confirm, so rather than
delete it for being redundant, let's enhance it to be different.

There are currently no resize/migrate tests in Tempest which
resize a volume-backed instance, so this changes the scenario
test to use a volume-backed instance for the resize.

This change is pretty simple, but anyone that was blacklisting
the test based on the name would be broken. However, they should
be blacklisting on the test uuid anyway, so meh.

Related to nova blueprint libvirt-instance-storage

Change-Id: Ie91b2881cb59638ac6e533ab93024dbc42111772
2016-05-10 20:37:15 -04:00
lanoux 5fc14522c6 Migrate scenario tests ssh-auth-strategy
Migrate the scenario tests to the new ssh-auth-strategy.

Partially implements: blueprint ssh-auth-strategy

Change-Id: I50759d32e47d975ec64ca129a13b2ae4459917e4
2015-12-01 16:02:01 +00:00
Ken'ichi Ohmichi c4e4f1cb3f Fix H404/405 violations for scenario tests
There is a lot of H404/405 violations in Tempest now, and that leads
difficult to migrate the code to tempest-lib or the other projects'
repos. This patch fixes these violations for scenario tests.

Change-Id: Ia2b3cdbd0da49eeb16742c1eed05ea56ca41a8f7
2015-11-17 09:15:12 +00:00
ghanshyam 0f825255e6 Return complete response from servers_client
Currently compute servers_client returns Response by
removing top key from Response.
For example-
 return service_client.ResponseBody(resp, body['server'])

As service clients are in direction to move to Tempest-lib, all
service clients should return Response without any truncation.
One good example is Resource pagination links which are lost with current
way of return value. Resource pagination links are present in parallel
(not inside) to top key of Response.

This patch makes compute servers_client to return
complete Response body.

Change-Id: I6a7b5c6144cafcb8f0780db01bf67999a4229389
Implements: blueprint method-return-value-and-move-service-clients-to-lib
2015-09-11 13:05:38 +09:00
Ken'ichi Ohmichi b2631087ee Add "server" to action methods - part 2
As the qa-spec of consistent-service-method-names, basically all
methods’ names should be "<verb>_<resource/object name>".
Ib91dc75055b9e2331d243cac686fe19c7516f6ba added the word "server"
to compute action methods, but it didn't cover some action methods.
So this patch tries it again for covering all action methods.

Partially implements blueprint consistent-service-method-names

Change-Id: I5ba600d33c600b515a49bd36fbb111502f6849c1
2015-09-01 13:12:50 +00:00
Ken'ichi Ohmichi 5271b0f96c Add "server" to action methods
As the qa-spec of consistent-service-method-names, basically all
methods’ names should be "<verb>_<resource/object name>".
So this patch adds the word "server" to compute action methods.

Partially implements blueprint consistent-service-method-names

Change-Id: Ib91dc75055b9e2331d243cac686fe19c7516f6ba
2015-08-13 02:05:39 +00:00
Ken'ichi Ohmichi 0eb153c636 Remove wait_for_server_status from servers_client
wait_for_server_status of compute client just calls the one of waiters
module and the method is a wrapper.
So the method seems redundant and it doesn't fit as service clients.

This patch removes wait_for_server_status from compute client and
replaces it with waiters' one.

Partially implements blueprint consistent-service-method-names

Change-Id: Ie821ea4ba0924b71caba80132e1c383fb5bb125d
2015-07-13 23:33:06 +00:00
Ken'ichi Ohmichi 7680024d0c Apply a naming rule of GET to show_server method
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to show_server method of compute clients.

Partially implements blueprint consistent-service-method-names

Change-Id: I92addd2ad6502fe00395e2b9455de25c2f53d115
2015-07-03 05:12:31 +00:00
Doug Hellmann 583ce2c043 Update all Oslo module use
Use graduated libraries where available and update the incubated modules
that remain.

Update imports for libraries that were being used already to avoid the
'oslo' namespace package.

Update config file for creating example configuration files and provide
a new sample file based on the options defined in the libraries.

Note: because of the number of libraries involved there is no real way
to break this change up into smaller pieces. Fortunately, most of the
changes are just to import statements.

Change-Id: Ia0de957b681cb924a57af98d99a9389ee234ed5b
2015-03-11 21:07:56 +00:00
Emily Hugenbruch 5e2d2a267f Split resource_setup for scenario tests
Split up the resource_setup method for all the scenario tests.

Partially-implements bp:resource-cleanup

Change-Id: Ic26799f5669b9eae23c462eb9f36637dbd11d574
2015-03-09 01:55:26 +00:00
Chris Hoge 7579c1a40e Add UUIDs to all tempest tests and gate check
Adds uuid4 as a decorator of the form:
@test.idempotent_id('12345678-1234-1234-1234-123456789abc')
to every test in the Tempest tree. Includes a gate check to
ensure the existence and uniqueness of the ids.

Modify check tool to ignore Tempest unit tests.

Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Implements: bp test-uuid
2015-02-26 16:05:16 -08:00
David Kranz 0fb1429278 Change basic server client methods to return one value and update tests
This includes create_server, update_server, get_server, delete_server and
also some helper methods such as create_test_server

Partially implements: blueprint clients-return-one-value

Change-Id: I8e1fba7a31a0ed27e683dacd9a8e763759552c11
2015-02-12 12:40:33 -05:00
Masayuki Igawa 60ea6c57f8 Fix resource_setup order in scenarios
As resource_setup() document says, we should check skip condition before
resource_setup. However some functions in scenarios setup resources
before skip checks. We should avoid to setup unnecessary resources as
possible. This commit fixes the order.

Change-Id: Id0529fc80f2b80f028fd078140fe5fd7459e9309
2014-10-15 17:38:30 +09:00
Andrea Frittoli ac20b5e14f Migrate scenario tests to resource_* fixtures
Partially-implements bp resource-cleanup

Change-Id: Ib6ad8614c6d1a84e32dd31d27f899df02eed260a
2014-10-03 12:18:53 +01:00
Ghanshyam aadf03687a Migrate test_server_advanced_ops to tempest client
This patch migrate the server advanced ops scenario tests
from official client to tempest clients.

This patch also correct some logging
For example -
During Suspending and Resuming the instance current state of instance
was wrong in log meggase.

Partially-implements: bp:tempest-client-scenarios

Change-Id: I5bad550e64d8226e479c28b74378d812a629e2d0
2014-08-27 16:51:26 +09:00
armando-migliaccio 9e5eac0bcc Honor suspend/pause config switches in scenario tests
Some tests missed checking for compute features as
set in compute-feature-enabled section in tempest.conf.

Reduce double-coverage of pause/suspend tests between
basic and advanced server tests by removing pause and
suspend actions in basic ops test.

Closes-bug: 1296858

Change-Id: I80d785bb5b325ccfac3c5cfd9d076718cf587e80
2014-04-01 08:02:07 -07:00
Masayuki Igawa 4ded9f057d Prepare for enabling H302 rule (scenario)
We can use H302 rule but ignore it now. This commit prepares for
enabling H302 rule. But this commit modifies tempest/scenario only
and excludes some violations[1] because if we fix all of them at one
time, it's hard to merge this commit.

[1]
 tempest.test.attr
 tempest.common.rest_client.RestClient
 tempest.common.rest_client.RestClientXML
 tempest.services.compute.xml.common.xml_to_json
 tempest.services.compute.xml.common.Element
 tempest.services.compute.xml.common.Document
 tempest.services.compute.xml.common.Text
 tempest.services.compute.xml.common.XMLNS_11
 tempest.services.compute.xml.common.XMLNS_V3
 tempest/clients.py

Change-Id: I57c26ef681120a9ee826b9cef26d1aaa734d69e5
2014-02-25 09:45:21 +09:00
Matthew Treinish 6c07229e13 Convert scenario tests to use global CONF object
This commit takes all the uses of config in the scenario tests and
converts them to use the global CONF object.

Partially implements bp config-cleanup

Change-Id: I1bac686587f1705901b653b07300077623ba9f21
2014-01-30 18:43:09 -05:00
Masayuki Igawa e8d31a0b80 Remove vim headers
We don't need to have the vim headers in each source files. We can set
it in our vimrc file instead. Also if set incorrectly, gate (pep8 check)
will catch the mistakes.

More discussions:
http://lists.openstack.org/pipermail/openstack-dev/2013-October/017353.html

Change-Id: I43703e2289212389c7841f44691ae7849ed1f505
Closes-Bug: #1229324
2014-01-20 11:22:45 +09:00
Sylvain Afchain 9206477468 Create only necessary networks resources for scenario tests
This patch leverages the set_network_resources method in
order to limit the network resources used.

Change-Id: Ia7defc783b5f55504e6c6923069f989a389a639f
2014-01-16 07:03:49 +01:00
Matthew Treinish d5c9602bee Reorganize project feature config options
This commit reorganizes the config options for each project into
separate groups. This makes it easier to identify where to set
which features are enabled.

Partially Implements: blueprint config-cleanup

Change-Id: Idf8c65ef9bbc11cadea236f0b1a491a0f82bb84b
2013-10-29 20:10:49 +00:00
Giulio Fidente 61cadcaca1 makes passing the client optional to utilities in scenario/manager.py
this makes passing the client optional to create_server and
create_security_group as it happens with the other utility methods

Change-Id: I56f7a4078d1da0c7b5bd7c493eb480d640be2805
2013-09-24 19:17:43 +02:00
ZhiQiang Fan 39f9722500 Replace OpenStack LLC with OpenStack Foundation
Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.

NOTE: tools/install_venv.py is not synced from oslo-incubator, so
it is modified too.

Change-Id: I0084684ff5225076291fea857eb010d638291bd0
Fixes-Bug: #1214176
2013-09-21 11:03:53 +08:00
Ken'ichi Ohmichi 06d9827427 Use common create_server method for advanced_ops
This patch changes "create server" implementation from each
implementation to the common method for code clean-up.

Change-Id: I04daf642ffdf5df6c7e5822f5f3c2281b0958a03
2013-09-14 11:52:59 +09:00
Matthew Treinish 2153ec0f71 Add services tags to scenario tests
This commit add service tags to all the test methods in the scenario
tests.

Part of bp add-service-tags

Change-Id: I9f4e125d05eeffd2dc2cbdc2b6346897166afad8
2013-09-12 14:06:34 +00:00
Matthew Treinish f4a9b0f55f Switch to using Oslo logging
This commit removes the tempest.common.log module and switches to
using the Oslo log module. The Oslo log module is required by
lockutils and it's dependent modules, so this patch migrates all of
Tempest to it so that there is only one logger in the project. This
also has the advantage of bringing Tempest's logging configuration
in line with other OpenStack projects.

Change-Id: I31b460e454123a4211c0a8a1dc91bbfd562ce81a
2013-07-30 14:21:26 -04:00
Attila Fazekas 1896652cb7 TestServerAdvancedOps server leaking
When added the testresources added as base class the resource variable usage
changed, and it renamed to os_resources in the other places.

TestServerAdvancedOps still want to use the old variable,
 however the base class has proper tearDownClass method.

Let the TestServerAdvancedOps to use the base class's tearDownClass.

Fixes Bug 1157306

Change-Id: I9bc1c90d526865cafbc6fbf71172aae10e95cb7d
2013-06-06 16:36:08 +02:00
Tatyana Leontovich 58ab531340 Adding test_server_sequence_suspend_resume
Test verify sequence instance suspend-resume
After second resume operation instace should be in Active state.

Change-Id: I94e74dad19cd932d45c3e201a454e7665a0b664d
2013-05-28 15:06:22 +03:00
Mitsuhiko Yamazaki 46818aaad8 Configure logging format flexibly
Now we can get tempest log file with options in run_tests.sh.
This adds log.py and enables to configure log format more flexibly
using configuration file.
This adds a LoggerAdaptor and a Formatter to output each test name
to log lines.

Implements: blueprint add-logging-configuration

Change-Id: I88cf18bb8bbc152e62ac83a9c7dc26067b7a11bd
2013-05-24 17:22:35 +09:00
Sean Dague 6dbc6da416 add scenario directory
this adds the scenario directory as part of the tempest
restructure, and moves scenario tests over to the new directory.

To ensure we got everything that used the old DefaultClient and
DefaultManager classes these are refactored out into the scenario
directory as OfficialClient and OfficialClientManager.

The Nework Smoke test base class becomes NetworkScenarioTest, and
the two test files that used that come over to scenario directory
in the process.

These are all done with a single tempest/scenario/manager.py file
for now. As the scenario tests grow we'll figure out better
refactorings there.

This gives us 4 scenario test files as a starting point for future
scenario work.

Fixed remaining refactor issues with network tests

Clean up the documentation on the extracted classes

Part of bp:tempest-repo-restructure

Change-Id: I143b282c58cfac3bf979ba5ac68226155beff343
2013-05-17 08:52:22 -04:00