Use common method to delete objects and containers after Swift
testing. The used method ensures proper deletion before continuing;
simply listing and deleting sometimes raises exeptions due to delayed
executions.
Also fixes a docstring to reflect current behaviour.
Change-Id: Ieaaba496028de741f3e506dac800b151aa833333
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: I60d39b91ae064300347a789aa1b72a3115afae76
partially-implements: blueprint testcase-description
Swift accept lot many headers in create container API but service
client method only accept the metadata headers.
This commit makes the PUT method to accept headers as kwargs.
Also this commit renames the PUT method to update_container because
that is PUT operation. In addition, this adds create_container as
the alias for the usability.
Details- https://developer.openstack.org/api-ref/object-store/#create-container
Partially implements blueprint consistent-service-method-names
Change-Id: I2a722bf181853ca903d05d4518b4c98764fadc12
Swift provides a single API to Create, Update or Delete
container metadata.
With different headers or values those operation can be
achieved. For example:
- delete metadata by passing metadata without value
- update metadata by passing updated value with same key
Details- https://developer.openstack.org/api-ref/object-store/?expanded=create-update-or-delete-container-metadata-detail
But current service client for account has 2 different
method for these operation. update_, delete_
To make it consistent with other service client and to have
single service client method per API, this patch merge those
methods.
Partially implements blueprint consistent-service-method-names
Change-Id: I75e40fc5c19d5b56d2be5f68e6cdb41bda4f9595
Make the list methods naming and doc string consistent
for container clients.
Partially implements blueprint consistent-service-method-names
Change-Id: Ibc770eef75a74880231d18670478e6ec99c90d1f
All service clients methods return their response wrapped in
ResponseBody, ResponseBodyData or ResponseBodyList.
But object storage service clients were left out of this
because response from object storage APIs are not same way other
service return. Some APIs return is as string etc.
This commit makes capabilities_client to return ResponseBody
object with consistency to other service clients.
Also add unit tests for that.
This is step to move these clients to lib.
Partially implements blueprint consistent-service-method-names
Change-Id: Ida85033c06a50011b2cd9a86941089fb1ea7bedd
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
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: Ifb59b89ec1bd7f8c17a55026b32b8af35c945594
Tests that use rand_name from tempest.lib.common.data_utils
are not adding the resources_prefix from the tempest
config file when creating resources. These tests should
be using tempest.common.data_utils which passes in the
resources_prefix as a parameter in the rand_name function call.
When resources_prefix is set in the tempest config file all of
the resources created should begin with this attribute. For some
tests this attribute is not passed to the rand_name function call.
This addresses that issue.
Change-Id: I662aad1916949750581e793981988edf1560ea94
Closes-Bug: #1628016
So many modules are using test.idempotent_id and this is for
switching to decorators.idempotent_id on object_storage.
Change-Id: I200875e4c4c61127c8dd430f09e5a9a24a03a129
Related-Bug: #1616913
Testcases should check the error message returned
by the system, not the error message defined in Tempest,
that is meaningless.
ref: https://tools.ietf.org/html/rfc7231#section-6.5.8
Change-Id: If84b7dc1f4b7681169d9041288169d81c5ebe586
Some swift negative tests do not honour the discoverability
feature flag. Fixing that.
Change-Id: I3dc192c62b7a04930643192262e790644f960b6d
Closes-bug: #1642619
When we need a invalid or nonexistent name in negative tests,
we can use something like 'nonexistent_name' directly instead of
creating a rand name, which will make code looks more clear and simple.
Change-Id: I63ae0e213f43cae665d90247ec5c26837c6ac2f5
list_all_container_objects is not a real client method but more of an helper.
We can use list_container_contents replace it. Therefore, I remove it.
Change-Id: I680868712461ab44c343b82fd007e6e9ea8d746b
Co-Authored-By: guo yunxian <yunxian.guo@easystack.cn>
These are standard interoperability tests to
check that proper errors are raised in certain
use cases.
The goal of this patch is to provide compliancy
for valid scenarios.
Change-Id: I8bbd13aa76057f3e450329da885c6dea795aa2ce