Commit Graph

674 Commits

Author SHA1 Message Date
Zuul 1687dd6ef6 Merge "Add access rules restriction tests" 2024-03-13 16:16:42 +00:00
silvacarloss d10819b89b Add access rules restriction tests
Adds new test cases and updates current test cases for access allow
and deny APIs. Such APIs now allow users to restrict the visibility
of some fields during the access creation, or even restricting the
deletion of access rules.

Depends-On: https://review.opendev.org/c/openstack/manila/+/887725
Change-Id: If0f7655dc6c11c6c12eeb76bd1cc853466235cca
2024-03-12 14:48:03 -03:00
silvacarloss cbab9fe0c7 Fix backup build erro exception class name
When backups fail to build, tempest is not displaying the correct
exception because the class name is not following the pattern we
expect it to follow.

This change fixes the class name for the share backups build error
exception.

Change-Id: I9553ba44544d84dbc452973252391967225c724e
2024-03-06 19:24:36 -03:00
Zuul bdc5ad5961 Merge "Add share backup tests." 2024-03-06 13:40:28 +00:00
Zuul a7f07f24d4 Merge "Use ddt.named_data decorator to avoid random test names" 2024-03-05 20:43:57 +00:00
lkuchlan de4bf8d29e Use ddt.named_data decorator to avoid random test names
There are few tests that generate random test names because
random parameters are given to the ddt.data  decorator.

In the ddt version number 1.6.0 there is a possibility to
determine the name of the tests without relying on the
given values. I think this could be a good solution for
the randomly generated names.

This change is being re-introduced as ddt version 1.6.0 is
now usable in the downstream CI. The original change is: Iaf39f4a83e383fb9db7f519136b9169352ff84af

The following change is also included: I4d274869e5e9e7800be44bccf7a2641b4a5febe8
Which replaces periods to underscores, a needed fix.

Change-Id: Iaf39f4a83e383fb9db7f519136b9169352ff84ad
2024-03-04 15:17:41 +00:00
silvacarloss cf874b1dac Ensure metadata tests manipulate only its own metadata
There are some metadata that only drivers or administrators can
manipulate, and if the tests haven't created those, we should not
be adding them to our asserts.

In this change, we are making sure that tests will only validate
the metadata that they are creating.

Change-Id: I168e1d9057d48b61eb325f2fd93dcc12a406f06e
2024-02-28 14:29:29 -03:00
Kiran Pawar edd82c7385 Add share backup tests.
Share backup tests i.e. create/delete/get share_backups.

Change-Id: I366221702b3aa2e78bff82e6b2a543b6f6784f77
2024-02-22 09:01:46 +00:00
Luigi Toscano 7604da8054 Remove unneeded randomness when calling ddt.data()
The usage of sets introduces unneeded randomness, and the
utils.deduplicate function can be used instead.

This is a follow-up to similar past changes, see:
I9cbd26016238c25487ac8104c1188cd2cf4f467e
I15bfbf6e1ca604f2bf2fcf12dcd4e67bc728fe5e
I8fce553d927da6d94471ecdf4040bbbb4377d9cf

Change-Id: I5477b815f212c5468c5e52905c4e1e1d4ef082bb
2024-02-13 14:05:51 +01:00
Zuul 874dd329f6 Merge "Fixed Share server migration test related to CIFS." 2023-12-13 19:32:53 +00:00
agireesh 541c6cd91d Fixed Share server migration test related to CIFS.
Modify "wait_for_resource_status" method so that we can pass the timeout
parameter from test cases and modify the test cases as per lib changes.

Change-Id: Id67589bf2d2094355003a16e3379867ba81bfb6b
2023-11-06 21:54:07 +05:30
Zuul 4a2f09514f Merge "Optimize the dd command to improve performance" 2023-10-31 13:01:58 +00:00
Zuul 7b8882908b Merge "Stop skipping test on volume existence detection" 2023-10-26 09:16:29 +00:00
Zuul 08236b23bd Merge "Change the expected status response from Forbidden to NotFound" 2023-10-20 20:18:28 +00:00
lkuchlan 2c06e81bfd Change the expected status response from Forbidden to NotFound
In some share metadata operations performed on a share resource
in another project by member and reader users, the response
code is 403/Forbidden but actually it should be 404/Not Found.

Related-Bug: #2004230
Change-Id: I23f592aa0616dd000c91366056b19f73d4a92fa5
2023-10-20 17:47:35 +00:00
lkuchlan 192d408d70 Optimize the dd command to improve performance
Use if=/dev/zero: Instead of reading from /dev/urandom,
which is slow for generating random data, use /dev/zero
to write zeros to the disk. Zeros are generated much faster.
Omit conv=fsync: The conv=fsync option forces dd to
synchronize the data after each write, which can be slow for
large writes.

Change-Id: Id845c60c39072a03171fa5906461eb254c2736a7
2023-10-18 14:20:08 +00:00
Zuul dae4d135da Merge "Add share transfer test." 2023-09-22 13:54:41 +00:00
haixin 1227546e7c Add share transfer test.
Partially-Implements: blueprint transfer-share-between-project

Change-Id: I74f0a079edb59e376d045fe9e9fd781acd70249d
2023-09-21 09:06:06 +08:00
Zuul a77dddc00c Merge "Change test manage share server with invalid id" 2023-09-19 14:46:11 +00:00
Pavlo Shchelokovskyy 88018ca2fa Stop using deprecated Nova APIs
some places in scenario manager were still using very long deprecated
nova APIs, like nova images and nova networks,
which breaks if tempest is configured to use nova microverson > 2.35.

Change-Id: I5b83e0d120525f7e8959f68a340635cf954bc7f8
2023-09-15 08:18:54 +00:00
Goutham Pacha Ravi 7cafa4cf4e Stop skipping test on volume existence detection
Depends-On: I7e05dcb343c932cc7fec8d395919053d0a1801ce
Change-Id: I3c99e4873cc7dc8bf8875fd3e3ed2f11d38a6dd7
Closes-Bug: #1901210
2023-09-14 00:34:41 +00:00
lkuchlan 0f7345a4dd [RBAC] Add share groups tests
The tests validate policy of share groups actions for
admin, member and reader users in a project scope.

Change-Id: Iee0f739d9701b2efe9b275ea22859318b58a46be
2023-09-06 07:01:22 +00:00
Zuul b0ab2128cb Merge "Test resource locks" 2023-08-28 16:07:56 +00:00
Goutham Pacha Ravi 646fcd2e23 Test resource locks
Add API tests for the resource locks APIs

Change-Id: Idf71e236b1b8a2558bb4ad3de1018fa33b41877f
Partially-implements: bp/allow-locking-shares-against-deletion
Depends-On: I146bc09e4e8a39797e22458ff6860346e11e592e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-21 16:52:44 -07:00
Zuul 8d4a2decf0 Merge "Remove Glance v1 APIs tests code" 2023-08-15 21:35:58 +00:00
Zuul efbad5d8dc Merge "[RBAC] Add share group type tests" 2023-08-11 01:09:15 +00:00
Zuul c6483c98ad Merge "Fix share network subnet cleanup" 2023-08-08 23:37:26 +00:00
Ghanshyam Mann 9cf773d9fb Remove Glance v1 APIs tests code
Glance v1 APIs were removed in Rocky and tempest master
does not support the Rocky release. If glance v1 APIs
needs to be tested for older release then older Tempest
can be used.

Tempest is removing the Glance v1 APIs tests, config option,
and its service clients and this change is needed for that.

Needed-By: https://review.opendev.org/c/openstack/tempest/+/890592
Change-Id: Ib7bbb274256a7e1d1e308adbd416d243ad7f8b54
2023-08-06 12:14:08 -07:00
Zuul 68fc053a27 Merge "Fixed multiple subnet negative tempest test" 2023-08-02 23:07:54 +00:00
Helena Dantas ab1c39cc29 Fixed multiple subnet negative tempest test
Changed skip_checks to verify if the flag
run_share_server_multiple_subnet_tests is enabled.

Changed the user that executes the command to retrieve the
share networks.

Closes-bug: #1966198
Change-Id: I93912f1683d5694a50a875c5dffbade958294e99
2023-07-31 12:37:29 +00:00
lkuchlan 5bd5f54073 [RBAC] Add share snapshot metadata tests
The tests validate policy of share snapshot metadata actions
for admin,member and reader users in a project scope.

Change-Id: I4de5c256ef468419cabf0293e05c0855fa67e095
2023-07-18 12:23:09 +00:00
lkuchlan 796f3ebff8 [RBAC] Add share group type tests
The tests validate policy of share group type actions
for admin, member and reader users in a project scope.

Change-Id: I759fe2b5048aea466cab9107cca68d70548bd347
2023-07-18 15:15:43 +03:00
silvacarloss 782a54dbd3 [RBAC] Wait for access rules to be applied prior to deletion
For some backends, the access rules might take some time to apply,
and if we try to clean up the rule before it was applied, we would
end up in a race condition.

In order to avoid this issue, we can wait for the access rule to be
active before proceeding to do other steps in the test.

Change-Id: Ib57eda56fdbec398d4dc6e80e982ace5f14727bb
2023-06-21 09:44:04 -03:00
Nahim Alves de Souza 4246d0b9fe [RBAC] Tests for Share Instance Export Locations
The tests validate policy of share instance export locations
actions for admin, member and reader users in a project scope.

Co-Authored-By: Renan Vitor <renanpiranguinho@gmail.com>
Change-Id: I5996a1fb5365e80acc3d1cb5418a62fd60eae4b2
2023-05-11 13:01:45 +00:00
Goutham Pacha Ravi 3d6c65f7e8 Fix incorrect extend syntax
A syntax issue introduced in I9d2bba8d87643abfc626346427e90569d9ed7a3e.

Change-Id: I5d07e6f08ac2a8d49ae45888852746ab29453702
Partially-implements: bp/metadata-for-share-resources
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-03-23 16:51:35 -07:00
Goutham Pacha Ravi 6661800272 Fix failing subnet test on stable/2023.1 branch
We haven't added tests for share network subnet
metadata yet, howver, if you set the max_microversion
to the version supported by the server in stable/2023.1 (2.78),
one of the tests fails since the API responds with
the new "metadata" key.

Change-Id: I9d2bba8d87643abfc626346427e90569d9ed7a3e
Partially-implements: bp/metadata-for-share-resources
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-03-17 19:41:21 -07:00
Zuul 5380c955f3 Merge "Correct share group tests cleanup order" 2023-03-13 23:48:59 +00:00
silvacarloss dab53f8e2b Correct share group tests cleanup order
Some share group tests were taking advantage of a bug in Manila.
Share network subnets were being allowed to be deleted even when
its share servers were tied to a share group. With that bug being
fixed, we need to ensure that the share groups are deleted before
the share network subnet alongside the share servers are.

Related-Bug: #2004212
Change-Id: I05607883c34bca586c795c7efab1df8d0edd6cff
2023-03-06 18:58:38 +00:00
Raffaela Cunha f59050e162 Change test manage share server with invalid id
Changes Tempest test according to Manila manager change 857960 to
prevent a share server to be managed only if its identifier is a
suffix of any existing identifier.

Closes-bug: #1982429
Change-Id: I14df0c9c7326ac49274699dc0ef1adb99570784b
2023-03-02 09:38:39 -03:00
lkuchlan 41d38ba53e Fix incorrect url request for share_group_reset_state
Use "/share-groups" for POST action instead of "/groups"

Closes-Bug: #2002940
Change-Id: I0d22cca0607e9bdc4835137cc0bf587061af92bf
2023-03-01 20:42:52 +00:00
Zuul 0f4e845830 Merge "[RBAC] Generate unique arguments for access rule creation" 2023-02-21 17:19:18 +00:00
lkuchlan 721c0e3a69 Use delete_resource helper method
This method deletes the resource and waits for
the deletion to finish.

Change-Id: Iacbf69545e2459526a594ce995511d11e320c066
2023-02-21 14:28:28 +02:00
lkuchlan c586d4965e [RBAC] Generate unique arguments for access rule creation
It's prefered to use unique value for 'access_to' variable.
It prevents granting the same value of 'access_to' to the
same share which will lead to 400 execption.

Change-Id: I99ed8136266541731df157b25566e73255bca3bd
2023-02-20 13:00:47 +02:00
Zuul 07f29e172b Merge "Revert "Use ddt.named_data decorator to avoid random test names"" 2023-02-14 20:59:19 +00:00
Zuul e37f0596e8 Merge "[RBAC] Add share access rules tests" 2023-02-12 17:30:34 +00:00
lkuchlan 72c3228a39 [RBAC] Add skip condition for share manage
In case a backend doesn't support this feature
the tests will fail.

Change-Id: I69fd7a3747986ce287c3a59cdc0f374fdd5b0099
2023-02-08 10:25:10 +02:00
Zuul 6783ad72e9 Merge "[RBAC] Add quota tests" 2023-02-07 14:59:41 +00:00
Zuul cec2e19991 Merge "[RBAC] Add share manage/unmanage tests" 2023-02-07 14:41:25 +00:00
Carlos Eduardo add7740f9b Revert "Use ddt.named_data decorator to avoid random test names"
This reverts commit 4b26d79ba7.

Reason for revert: This can be backwards compatible. We want to revert it for now.

Change-Id: Ica4a6ff8f655d372baee73c2daab8517188655aa
2023-02-06 10:43:14 -03:00
kpdev 2521fbf86a Add tests replica create with 'share-network' option.
This patch update positive and negative tests using the
share replica create API. For version >= 2.72.

Partial-Bug: #1925486
Depends-On: I9049dcd418fbb16d663ab8ed27b90c765fafc5d3
Change-Id: I76175e33f506e35112ab9e86724caa3aea8f546d
2023-01-27 08:34:45 +00:00