Some tests from share group and replication are not creating
share following the `share_size` tempest CONF. This patch
fixed them applying that configuration.
Change-Id: If525e97a5d456d6ddebb4bf9bc8ff6190c95a555
This patch is a preparation for adding RBAC tests.
Currently, we only return the body without the response
in manila REST client. The response is necessary for
the testing, because we need to check the returned code
status and to compare it with the expected status.
This way we will check if the user has the right
permissions for the action.
Change-Id: If0e39afb635c469a25919770a869087bf5def561
Change of inheritance to "BaseSharesMixedTest" class since it
requires admin privileges.
This change will allow removal of duplicate code.
Beyond that, "create_share_type" method is under "BaseSharesTest",
which is incorrect since it requires admin privileges.
Change-Id: Idd2c2285e266f0b733301ccfae5c423340de2511
For legacy reasons we always included snapshot_support
and create_share_from_snapshot_support in all the
share types the tests created. These extra-specs are
no different from any other optional extra-specs in
manila, atleast since API version 2.24 (snapshot_support
was "implied"/"required" until API version 2.23). 2.24
is a really old version to support for tempest testing.
Since we always use the latest API version to create the
share types necessary, we only ever need 1 required
extra spec (driver_handles_share_servers) - lets supply
the rest only within tests that need to test snapshots
and shares from snapshots.
This patch also adds missing skip decorators for share
group tests that were testing snapshots.
Change-Id: Ifaceab574e3242e44a9cf1bea77a4be9e505d8b8
Related-Bug: #1922784
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
API tests must be evaluated by min and max
versions, however, we've multiple places
where we don't seem to evaluate the min_version;
this leads to incorrect behavior when test
runners set a different min_version in their
test configuration.
We can also consolidate the decorators and
callables that we have. We attempted this in
the recent past [1], however, we replaced the
callables with calling a decorator method, which
resulted in many tests not being skipped.
This bugfix is currently necessary to get
tests working against stable/ussuri and
stable/train branches.
[1] I0c35aff993e67c1ef44c27580f8c2c829a6275f7
Change-Id: I2eceb1d5fe42b1b779e115a0144a5d9639d3753f
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Currently, for each resource there is a waiter method.
The code is almost the same in all waiter methods.
This patch suggests proposes to consolidate these methods.
Change-Id: I92f4628051731a9f7e05404b48a96d2ed27a855b
Currently, resource waiters methods are placed under
service clients modules. There are three duplicated
waiters in both v1 and v2 modules:
- wait_for_share_status
- wait_for_snapshot_status
- wait_for_access_rule_status
This patch suggests to separate the waiter functions
from client modules and collect them in one place.
Change-Id: I9f0d50a325139e6067e4339533d4b01a322df7a8
We should add a unique identifier for manila tests like
done in tempest. This will help to track a specific
test over time.
This patch adds a unique id for all functional and scenario
tests and also adds check-uuid to tox tests.
Change-Id: I262c7df709a8a7e9ed36591571069b9bcef0f51c
A number of tests are creating an "isolated"
test credential to test cross project separation.
This isn't necessary, since test base classes
already request projects to run the tests. So we
can just use different project contexts where
appropriate.
In the quota tests, we request tempest to allocate
us fresh credentials, because these tests can be
destructive if they accidentally malfunction.
We do this by setting the class level directive
"force_tenant_isolation=True". Whenever we do
this, we will skip the tests if tempest is
configured to not use dynamic credentials;
because tempest will gladly ignore the explicit
configuration to disallow dynamic credentials
and give us new credentials, which might be
frustrating to test runners.
In this change, we
- delete all the code to request "isolated"
test credentials from tempest.
- delete code that was written to cleanup
test credentials allocated to test "methods"
and classes.
- refactor quota tests to revert updates
when the test concludes (requesting fresh
credentials for these tests is just a fail-safe)
- Fix creation of share types per visibility, a change
that was accidentally removed in [1]
- Fix "SharesAdminQuotasUpdateTest.test_reset_share_type_quotas"
by using a correct project user instead of a
random project's user to force enforce user quota
higher than the project.
[1] I15880e400df30918762ebd7304244b4a27200168
Co-Authored-By: Lucio Seki <luciomitsuru.seki@fit-tecnologia.org.br>
Change-Id: I7607019e47ce9e8c6584f69c2b2d3228873f24df
Closes-Bug: #1883795
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
Manila tempest plugin class structure should be compatible
with tempest project as manila tempest plugin is a plugin
of tempest.
In some cases incompatibility can cause problems.
For example: using "check_uuid" tool for generating UUIDs
for tests does not work properly in manila, Because some
classes are wrapped with conditions skipped.
I suggest to use "skip_checks" method that been used to
evaluate config before tests methods and skip them based
on these checks.
This patch moves all conditions under this method.
Two new functions been added to "skip_checks" method
in order to skip by microversions and reduce a duplicated
code:
- "check_skip_with_microversion"
- "check_skip_with_microversion_not_supported"
Change-Id: Id0a15dbfbd3d85d7773c26e252f4cc4d906cf377
This patch enables share-replica tests to be executed in a multitenancy
environment, providing a share-network to be used by both shares and
share-replicas.
The multitenancy test for share-replicas will be enabled only for API
version equal or greater than 2.51.
Depends-On: I60bdb493ad5766f28408a0c877f960922fe44ad0
Change-Id: Icb93fc346b71edc7bb3ac989e9751899bb80fbe5
Whenever creating a resource in an availability zone,
the positive test cases must ensure that the AZ supports
the characteristics needed by the resource.
Add a new helper method to filter AZs by share types
to facilitate such a check.
Change-Id: Ia721c434ceae5f02fc51bef5ec48b356da0de98d
Closes-Bug: #1811739
Tempest assumes a default share type already created
to work. This means, if a default share type is not
created and not specified in the conf file, tempest
tests fail. A workaround is to create a share type
as part of the environment setup for all the tests
that need it. This patch set does that.
Change-Id: I15880e400df30918762ebd7304244b4a27200168
Closes-Bug: #1743472
The snapshot_support extra spec has always meant two
things: a driver can take snapshots and create shares
from snapshots. As we add alternate snapshot semantics,
it is likely that some drivers will want to support
snapshots and some of the new semantics while being
unable to create new shares from snapshots.
This work adds a new extra spec,
create_share_from_snapshot_support, that removes the
overloading on snapshot_support. It also makes the
existing snapshot_support extra spec optional,
allowing admins to create types without setting
snapshot_support; shares created with such types
will not support snapshots.
APIImpact
DocImpact
Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Implements: blueprint add-create-share-from-snapshot-extra-spec
Change-Id: Ib0ad5fbfdf6297665c208149b08c8d21b3c232be
Manila tempest tests should be independent from tempest code
as much as possible. The decorator test.attr is widely used in
all tests to set testcase attrs. This decorator doesn't
really do anyting else than calling testtools.testcase.attr.
Change-Id: If10beb9ae7562524f602a6fd7254aa95ef24d70e
Partially-Implements: bp tempest-no-deps
Test "test_unmanage_replicated_share_snapshot_with_no_replica" is
located in "replication" test suite. But, it does only
"snapshot unmanage" actions without any relations to "replication".
Also, it does not delete real snapshot resource, because
"manila snapshot" gets only unmanaged.
So, just remove above mentioned test as duplication that, moreover,
leads to resources orphanage and cleanup errors.
Change-Id: Ifc762a882a78159adacfe168a4edbe824178301a
Closes-Bug: #1599165
Currently, Manila CI Tempest jobs use deprecated options of Tempest.
Recently, latest version of Tempest dropped them [1].
Manila CI jobs work ok, because they check out specific version of
Tempest. But it will work until first Devstack update for some one
more Tempest feature and then we will be forced to use latest Tempest
again. Switch to supported approach of setting up users in Tempest,
to avoid such sudden blockers.
[1] I8c24cd17f643083dde71ab2bd2a38417c54aeccb
Change-Id: I5b3ebab52ea1401f6f7a116d1260268eb10ebe0c
Closes-Bug: #1586129
To be able to run tests based on following criteria:
- Only API is required and tested.
- API and share back-end required, API is tested.
- API and share back-end required, back-end is tested
Also, add doc with detailed description of running subset of tests.
Change-Id: I9ae105eaa527621c85d5038bba15edf4b065eaa3
Closes-Bug: #1587874
Managing a share with a share type that has replication_type
extra_spec must be allowed. Drivers are expected to fail
this operation if the share was part of a replication relationship
that Manila does not know about.
Unmanaging a share with replicas must not be permitted
until all replicas are removed.
Managing and unmanaging of snapshots must not
be permitted for a share that has replicas.
Modify the NetApp driver for manage_existing to check
for existing replicas.
Also fix issue with manage retry where the share
data was being altered inappropriately by a DB API.
Closes-Bug: #1561641
Closes-Bug: #1565903
Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Change-Id: I82f1fef1e30114e017efd00fa7da70aceecab94c