summaryrefslogtreecommitdiff
path: root/tempest/api/compute/admin/test_agents.py
Commit message (Collapse)AuthorAgeFilesLines
* edit check result and make sure the query result correctwanglbj2020-12-161-0/+2
| | | | | | In the line 116 of file test_agents.py, the function is query agent by hypervisor, but query result check cannot make sure all members of query result is right. So add result check, make sure all the query members is right. Change-Id: Ifdb97e6dd4b4aeb707f366fe869bb22e707b13b8
* Add 'xenapi_apis' compute feature flagStephen Finucane2020-09-101-0/+10
| | | | | | | | | | | | | | Nova is removing the XenAPI virt driver. There are a number of APIs that only work with this virt driver so those are being removed at the same time. Once removed, they will return a HTTP 410 response, regardless of the microversion. Add a feature flag that allows us to skip these tests on clouds that no longer provide these APIs. It default to False (skip). We will set this to True (do no skip) on stable branches of nova. Change-Id: I0ae3f7a81ca7b56f56871e61bcf196ca572ae6d6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Adding description for testcases - compute part6zhufl2020-08-101-5/+6
| | | | | | | | | | | | | | | When Tempest is used in customer site, often we are required to provide a testcase list including testcase names and descriptions. Now no this kind of doc is available, so we can add descriptions with the format of doc string for every testcase, so later we can generata such a testcase description list. There are hundreds of testcases missing descriptions, so we can add them gradually, and limit the modified files in one patch for the convenience of reviewing. Change-Id: I1469ad5a34bac75203b2eb063326eded096706a5 partially-implements: blueprint testcase-description
* Do not print empty list in assertNotEmptyzhufl2017-08-101-2/+2
| | | | | | | | 1. Printing empty list in assertNotEmpty is meaningless 2. Do not use one line function especially when that line is not very long. Change-Id: If952fd622cad9528cbb0532d8d7f573e97869342
* Use assert(Not)Empty,IsNotNone instead of assert(Not)Equal,GreaterEqual(0, ↵Masayuki Igawa2017-06-051-4/+2
| | | | | | | | | | | | | | len(.. This commit makes to use assert(Not)Empty() or assertIsNotNone() instead of assert(Not)Equal(0, len(LIST),..) or assertGreaterEqual(0, len()...). The original code asserts the specified list is empty or not. And we already have assert(Not)Empty() for it. The method names "assert(Not)Empty" are straightforward and easy to understand. It makes the code clean and the assert message could be easier to understand what is happen than original ones. Change-Id: I715ec84d9139b1d196275e91212ab40d52a545e1
* test.py: stop using aliases for creds managerJordan Pittier2017-04-261-1/+1
| | | | | | | | | | | | | | It could be confusing to new comers that the variables cls.os and cls.os_primary or cls.alt_manager and cls.os_alt actually are aliases. Besides we are not consistent in their usage. This patch normalizes the usage around os_admin, os_primary and os_alt. We keep the old aliases for compatibility but we should not use them anymore. This fix a long standing TODO item. Change-Id: I5f7164f7a7ec5d4380ca22885000caa0183a0bf7
* Use tempest.lib data_utils - computeKen'ichi Ohmichi2017-03-101-1/+1
| | | | | | | | | | Tempest has duplicated modules of data_utils, one is tempest.lib and the other is tempest.common. The difference is tempest.common module refers to the config option resources_prefix. And the option is marked as deprecated already. So it is nice to replace the calls with tempest.lib one. Change-Id: Idfa9824d14a1e5e4291fcb70bb2c00caf9083d67
* Switch to decorators.idempotent_id on compute.adminKen'ichi Ohmichi2017-01-281-6/+6
| | | | | | | | So many modules are using test.idempotent_id and this is the first step for switching to decorators.idempotent_id. Change-Id: I55a61d40f18f8fa0fea8423ad65302c1e3559205 Related-Bug: #1616913
* Remove unused CONF and LOGzhufl2016-12-151-4/+0
| | | | | | | There are some unused CONF and LOG in testcases, this is to remove them for code clean. Change-Id: Ic71abaef87ac7de1e6470ca7e6685acd899a9e0c
* Use more specific asserts in testsBéla Vancsics2016-11-091-2/+4
| | | | | | | | | | Instead of assertTrue and assertFalse use more specific asserts. They are compatible with Python 2.7[1] and 3.4[2] [1]: https://docs.python.org/2.7/library/unittest.html [2]: https://docs.python.org/3.4/library/unittest.html Change-Id: I3ac49863641e26841210d020e8bca0bd93176423
* Fix compute test_agents testsBenny Kopilov2016-09-261-24/+25
| | | | | | | | | | | Trying to keep the same methods for all tests classes steps . Evrey testcase creates an agent , it is deleted in addCleanup. Remove setUp(self) , Use resource_setup() for class Change _param_helper to @staticmethod Remove testcases tearDown, there is addCleanup for each testcase Change-Id: Idc46d46eb5b154aae024b868da2c97b3c6bbdcdd
* Introduce new helper: call_and_ignore_notfound_exc()Jordan Pittier2016-05-281-4/+3
| | | | | | | | | | | | | | | | | This new function calls a function passed as parameter and ignore the NotFound exception if it raised. This removes some code duplication. Also a new `test_utils` module is introduced to tempest.lib and the `find_test_caller` function is moved into that new module. Backward compatibility and deprecation path are ensured and documented. Note for the future: having a module called "misc" is not optimal because the name is not super descriptive. (it's a detail though, but worth mentioning imo). Change-Id: I5a4523c20c19957bfccf2aa95157baf106b3d364
* Use tempest.lib code in tempestAndrea Frittoli (andreaf)2016-02-241-1/+1
| | | | | | | | | | | | | Now that tempest_lib code is copied back into tempest, stop using tempest_lib in tempest, and start using the copied code. Remove the dependency to tempest_lib from requirements, and drop the script to use tempest_lib in tempest. Add os-testr to the test-requirements. Partially implements bp tempest-lib-reintegration Change-Id: I21ab5fe6349f72c98ac9f960a29bf62e813f8b1b
* Wrong spelling of existingFelix Li2016-01-041-1/+1
| | | | | | Change "exising" to "existing" Change-Id: I23b5f3f7bd358b5a5ebe0a4ec712f739549e8771
* Fix H404/405 violations for api tests(3/3)Ken'ichi Ohmichi2015-11-191-3/+1
| | | | | | | | 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 api tests of compute. Change-Id: Id6346f6a4a46dea56319ab482a4f499d0de098f9
* Return complete response from compute/agent_clientghanshyam2015-08-171-7/+8
| | | | | | | | | | | | | | | | | | Currently compute agent_client returns Response by removing top key from Response. For example- return service_client.ResponseBody(resp, body['agents']) 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 agent_client to return complete Response body. Implements: blueprint method-return-value-and-move-service-clients-to-lib Change-Id: I65c60ab85945e66bd696ec4d89ad73cc4f7f2004
* Make argument params of list methods consistentKen'ichi Ohmichi2015-07-131-2/+1
| | | | | | | | | The argument type "params" is not consistent between list methods of compute service clients. This patch makes them consistent. Partially implements blueprint consistent-service-method-names Change-Id: I40ca879f2c8b82871d4a9bc1592a5396cf00aeb8
* Use the prefix-embedded rand_name methodFei Long Wang2015-07-061-1/+1
| | | | | | | | A version of data_utils.rand_name in tempest_lib was created in tempest to include a prefix specified in the conf file. This commit changes the data_utils imports to use the new one in tempest. Change-Id: Ie3fb5c3ac9afe365bf24e40b00be88d66da7c507
* remove gate tag (part 1)Sean Dague2015-04-271-5/+0
| | | | | | | | This removes all bare gate attribute tags from functions, the gate tag was a never fully implemented idea in the past, and it's existence in the code mostly just confuses people. Change-Id: I462ca7a8cadeb5013e2bce44ed1e69bcf8f9d968
* Update all Oslo module useDoug Hellmann2015-03-111-1/+1
| | | | | | | | | | | | | | | | | 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
* Merge "Remove migrated utils code"Jenkins2015-03-101-1/+1
|\
| * Remove migrated utils codeMatthew Treinish2015-03-061-1/+1
| | | | | | | | | | | | | | This commit removes all the utils code which has been migrated to tempest-lib and updates the uses of it to point to the library instead. Change-Id: I9207641aa91c0ea7feb8e067316fc220880c3a3b
* | Split resource_setup for compute testsRohan Kanade2015-03-091-2/+2
|/ | | | | | | | | Split up the resource_setup method for all the compute tests, as per the latest spec. Partially-implements bp:resource-cleanup Change-Id: I6562534ca5eb5e33c6f8d6cbcac5e7735535916a
* Add UUIDs to all tempest tests and gate checkChris Hoge2015-02-261-0/+5
| | | | | | | | | | | | | 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
* Change tempest NotFound exc to tempest-lib excMasayuki Igawa2015-02-121-2/+3
| | | | | | | | This commit changes tempest.exceptions.NotFound to tempest_lib.exceptions.NotFound. This is one of the migrating rest client to tempest-lib works. Change-Id: I2be04f600e6bd8d7d78948d25395d8e04fa0dea3
* Change some compute admin image client methods to return one valueDavid Kranz2015-01-161-16/+8
| | | | | | | | | agents, aggregates, hosts, hypervisors, services were modified and tests updated. Partially implements: blueprint clients-return-one-value Change-Id: Ib633020d06ea864fd228203b06cb5e68d75f8e60
* Migrate computev2 API tests to resource_* fixturesAndrea Frittoli2014-09-181-2/+2
| | | | | | Partially-implements bp:resource-cleanup Change-Id: I59eb2d9789368c812282ce12ae7e571be720badb
* Add V2 Nova API os-agents testsYuiko Takada2014-04-071-0/+123
This patch adds V2 Nova API - os-agents tests. Change-Id: I18f1a95ac5e22a646da9aeb52f096f7caa82e8c8