16 Commits

Author SHA1 Message Date
lkuchlan
86f2432476 Enable http response extraction
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
2021-07-21 12:45:09 +03:00
lkuchlan
3af822bf96 Fix class inheritances in base.py
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
2021-06-21 18:14:25 +00:00
lkuchlan
3024bb2bae Fix extra specs for share type
In case the backends don't have the same capabilities
share creation can fail. For instance, if one of the
backend has the ability to create share from snapshot
and the other does not.
In case "capability_create_share_from_snapshot_support"
parameter is defined in tempest.conf and it is also
specified in extra specs one of the share will fail to
create.

Change-Id: Iade5b2658df59b7d6cdc9f69418afb16a0108353
2021-02-17 21:23:34 +02:00
lkuchlan
9ddff80a5b Enable running multi-backends tests with different share protocols
Currently, multi-backends tests reside in test_multi_backend.py does
not support different share protocols.
In that case, we have to specify for each backend its share protocol
for share creation.

Change-Id: I9e4a8c36dc86ea26dd667f87e4d9703dfb50ad4b
2021-01-26 08:22:54 +02:00
lkuchlan
88452b3d31 Add uuid for tests
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
2020-09-08 10:54:10 -07:00
Béla Vancsics
9d11c95a5f Use more specific asserts in tests
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: I2dae60fe786a99344fc12dd4aeaea9c79c9811c5
2017-02-09 06:47:38 +01:00
Clinton Knight
4699a8c73d Add create_share_from_snapshot_support extra spec
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
2016-12-21 09:57:08 -05:00
Marc Koderer
e2251ea8e9 Remove tempest.test usage from manila tests
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
2016-09-30 12:47:17 +00:00
vponomaryov
398aff3e59 [Tempest] Remove noqa filters
Filter noqa is used to avoid expected pep8 failures.
But now, tempest has lots of these without any reason.
Therefore, remove this filter and unused modules that were
discovered as unused without it.

Change-Id: I96f8a4a7e7a302f08581eed9e037f388e4c86802
2016-06-14 13:05:18 +03:00
Valeriy Ponomaryov
2abf5d7dc2 [Tempest] Add valuable tags to tests
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
2016-06-08 11:25:32 +03:00
Ben Swartzlander
1c4ff523ac Update tempest commit and switch to tempest.lib
tempest_lib was renamed to tempest.lib which causes problems
when running tests because tempest imports plugins from other
projects and crashes.

Closes bug: 1552520

Change-Id: Id7d43dee256856062bd0dadad9c469c1500ee36e
2016-03-02 23:09:00 -05:00
Jenkins
078f140ec4 Merge "Fix params order in assertEqual" 2016-02-08 15:41:41 +00:00
Yatin Kumbhare
3b13751f7d Fix params order in assertEqual
Fix params order to correspond to real signature:
assertEqual(expected, actual)

Change-Id: I5887e9c4fbd8953b3be9e89ce86758f8d1d842b2
Closes-Bug: #1277104
2016-01-27 11:52:08 +05:30
Julia Varlamova
e07ccb9da2 Fix Manila tempest tests
Remove test_share_export_locations since export locations format
depends on driver. For Generic driver different IPs are expected
in this case, for LVMDriver - same IPs.

Fix setup for ShareRulesTest class. Move all code from 'setUp' to
'resource_setup' method. Use shares_v2_client instead of shares_client
of BaseSharesTest.

Closes-bug: #1534173

Change-Id: Ie0472a061137c1cf28685766150addd5b0722484
2016-01-14 09:16:16 -05:00
Igor Malinovskiy
edb051167d Return share_type UUID instead of name in Share API
APIImpact
Change-Id: I082bdac82c981adf733c709472ce1b9e26d5650b
Closes-Bug: #1483886
2015-09-14 06:14:24 -07:00
Marc Koderer
0abc93b859 Use Tempest plugin interface
Make use of the Tempest plugin interface instead of copying Manila
files into Tempest. This will remove the burden to port Manila
tests onto Tempest master recurrently.

This ports all existing Manila Tempest test to the new structure.

It uses manila_tempest_tests as new top folder for all Tempest
tests. It follow the model of Heat (see [1]).

[1]: https://github.com/openstack/heat/tree/master/heat_integrationtests

Change-Id: Ie5ed64a6777ed1acf8dd56522c26705ae897596d
Partly-implements: bp tempest-plugin-interface
Depends-On: I26dd32b1de8cceeaa6dc674092efec683df71889
2015-09-05 00:36:33 +00:00