Moves test_security_services and test_share_networks tests
Moves "Fix getting share networks and security services error"
related tempest tests.
Related change: Ied021b66333f1254cd232bbc38562a4a9b762ad2
TrivialFix
Change-Id: I7c742475966b9fc4546ea676d969a2787dee973f
diff --git a/manila_tempest_tests/tests/api/test_security_services.py b/manila_tempest_tests/tests/api/test_security_services.py
index fd884f2..30cf6a9 100644
--- a/manila_tempest_tests/tests/api/test_security_services.py
+++ b/manila_tempest_tests/tests/api/test_security_services.py
@@ -200,3 +200,11 @@
self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
for ss in listed))
+
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ def test_try_list_security_services_all_tenants(self):
+ listed = self.shares_client.list_security_services(
+ params={'all_tenants': 1})
+ self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
+ self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
+ for ss in listed))
diff --git a/manila_tempest_tests/tests/api/test_security_services_negative.py b/manila_tempest_tests/tests/api/test_security_services_negative.py
index 1f8e188..0814b6d 100644
--- a/manila_tempest_tests/tests/api/test_security_services_negative.py
+++ b/manila_tempest_tests/tests/api/test_security_services_negative.py
@@ -120,9 +120,3 @@
self.assertRaises(lib_exc.NotFound,
self.shares_client.get_security_service,
ss["id"])
-
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
- def test_try_list_security_services_all_tenants(self):
- self.assertRaises(lib_exc.Forbidden,
- self.shares_client.list_security_services,
- params={'all_tenants': 1})
diff --git a/manila_tempest_tests/tests/api/test_share_networks.py b/manila_tempest_tests/tests/api/test_share_networks.py
index 3484264..4a44c12 100644
--- a/manila_tempest_tests/tests/api/test_share_networks.py
+++ b/manila_tempest_tests/tests/api/test_share_networks.py
@@ -36,6 +36,26 @@
[self.assertIn(key, sn.keys()) for sn in listed for key in keys]
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ def test_try_list_share_networks_all_tenants(self):
+ listed = self.shares_client.list_share_networks_with_detail(
+ params={'all_tenants': 1})
+ any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
+
+ # verify keys
+ keys = ["name", "id"]
+ [self.assertIn(key, sn.keys()) for sn in listed for key in keys]
+
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API)
+ def test_try_list_share_networks_project_id(self):
+ listed = self.shares_client.list_share_networks_with_detail(
+ params={'project_id': 'some_project'})
+ any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
+
+ # verify keys
+ keys = ["name", "id"]
+ [self.assertIn(key, sn.keys()) for sn in listed for key in keys]
+
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API)
def test_list_share_networks_with_detail(self):
listed = self.shares_v2_client.list_share_networks_with_detail()
any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
diff --git a/manila_tempest_tests/tests/api/test_share_networks_negative.py b/manila_tempest_tests/tests/api/test_share_networks_negative.py
index 5fdc684..02bbdb9 100644
--- a/manila_tempest_tests/tests/api/test_share_networks_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_networks_negative.py
@@ -82,18 +82,6 @@
sn["id"])
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
- def test_try_list_share_networks_all_tenants(self):
- self.assertRaises(lib_exc.Forbidden,
- self.shares_client.list_share_networks_with_detail,
- params={'all_tenants': 1})
-
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
- def test_try_list_share_networks_project_id(self):
- self.assertRaises(lib_exc.Forbidden,
- self.shares_client.list_share_networks_with_detail,
- params={'project_id': 'some_project'})
-
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
def test_try_list_share_networks_wrong_created_since_value(self):
self.assertRaises(
lib_exc.BadRequest,