From 8d3dbe2e1320247b026a01901d0c8acd9f9a97c7 Mon Sep 17 00:00:00 2001 From: Dustin Schoenbrun Date: Wed, 29 Mar 2017 17:33:31 -0400 Subject: [PATCH] Add read-only tests for cephx access rules In the Newton cycle the ability to create read-only rules for cephx-backed access rules was added but there were no functional tests to exercise this feature. This patchset adds new parameters to the existing cephx access rule test to also test read-only rules. Change-Id: I4b4fd5790526ebc596471fd913ffe9cdb2faa520 --- manila_tempest_tests/tests/api/test_rules.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/manila_tempest_tests/tests/api/test_rules.py b/manila_tempest_tests/tests/api/test_rules.py index 024590ddd4..1f227ddb15 100644 --- a/manila_tempest_tests/tests/api/test_rules.py +++ b/manila_tempest_tests/tests/api/test_rules.py @@ -422,13 +422,15 @@ class ShareCephxRulesForCephFSTest(base.BaseSharesTest): @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND) @ddt.data(*itertools.product( set(['2.13', '2.27', '2.28', LATEST_MICROVERSION]), - ("alice", "alice_bob", "alice bob"))) + ("alice", "alice_bob", "alice bob"), + ('rw', 'ro'))) @ddt.unpack - def test_create_delete_cephx_rule(self, version, access_to): + def test_create_delete_cephx_rule(self, version, access_to, access_level): rule = self.shares_v2_client.create_access_rule( - self.share["id"], self.access_type, access_to, version=version) + self.share["id"], self.access_type, access_to, version=version, + access_level=access_level) - self.assertEqual('rw', rule['access_level']) + self.assertEqual(access_level, rule['access_level']) for key in ('deleted', 'deleted_at', 'instance_mappings'): self.assertNotIn(key, rule.keys()) self.shares_v2_client.wait_for_access_rule_status(