From 567e8312d754df238d685828369179f7e624686b Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Jun 30 2020 16:28:35 +0000 Subject: Issue 50840 - Fix test docstrings metadata Bug Description: Some tests have an incorrect metadata in the docstrings. This prevents the import of the test cases in the test case management system. Fix Description: Update the metadata: * Add missing test tier markers * Fix missing newline between the short description and :id: token. * Update test descriptions * Fix aci tests so that the correct test case name is used in the aci description * Fix all warnings and errors reported by docutils parser Fixes: https://pagure.io/389-ds-base/issue/50840 Reviewed by: mreynolds (Thanks!) --- diff --git a/dirsrvtests/tests/suites/acl/acivattr_test.py b/dirsrvtests/tests/suites/acl/acivattr_test.py index 35759f3..d55eea0 100644 --- a/dirsrvtests/tests/suites/acl/acivattr_test.py +++ b/dirsrvtests/tests/suites/acl/acivattr_test.py @@ -174,18 +174,19 @@ LDAPURL_ACI = '(targetattr="*")(version 3.0; acl "url"; allow (all) userdn="ldap '(ENG_USER, ENG_MANAGER, LDAPURL_ACI)', ]) def test_positive(topo, _add_user, aci_of_user, user, entry, aci): - """ - :id: ba6d5e9c-786b-11e8-860d-8c16451d917b - :parametrized: yes - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. ACI role should be followed - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed + """Positive testing of ACLs + + :id: ba6d5e9c-786b-11e8-860d-8c16451d917b + :parametrized: yes + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. ACI role should be followed + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed """ # set aci Domain(topo.standalone, DNBASE).set("aci", aci) @@ -225,18 +226,19 @@ def test_positive(topo, _add_user, aci_of_user, user, entry, aci): ]) def test_negative(topo, _add_user, aci_of_user, user, entry, aci): - """ - :id: c4c887c2-786b-11e8-a328-8c16451d917b - :parametrized: yes - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. ACI role should be followed - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed + """Negative testing of ACLs + + :id: c4c887c2-786b-11e8-a328-8c16451d917b + :parametrized: yes + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. ACI role should be followed + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should not succeed """ # set aci Domain(topo.standalone, DNBASE).set("aci", aci) diff --git a/dirsrvtests/tests/suites/acl/acl_test.py b/dirsrvtests/tests/suites/acl/acl_test.py index 5ca8652..63195eb 100644 --- a/dirsrvtests/tests/suites/acl/acl_test.py +++ b/dirsrvtests/tests/suites/acl/acl_test.py @@ -411,7 +411,8 @@ def test_moddn_staging_prod(topology_m2, moddn_setup, def test_moddn_staging_prod_9(topology_m2, moddn_setup): - """ + """Test with nsslapd-moddn-aci set to off so that MODDN requires an 'add' aci. + :id: 222dd7e8-7ff1-40b8-ad26-6f8e42fbfcd9 :setup: MMR with two masters, M1 - staging DIT diff --git a/dirsrvtests/tests/suites/acl/deladd_test.py b/dirsrvtests/tests/suites/acl/deladd_test.py index 45a66be..0e39f09 100644 --- a/dirsrvtests/tests/suites/acl/deladd_test.py +++ b/dirsrvtests/tests/suites/acl/deladd_test.py @@ -86,8 +86,8 @@ def _add_user(request, topo): def test_allow_delete_access_to_groupdn(topo, _add_user, _aci_of_user): - """ - Test allow delete access to groupdn + """Test allow delete access to groupdn + :id: 7cf15992-68ad-11e8-85af-54e1ad30572c :setup: topo.standalone :steps: @@ -124,8 +124,8 @@ def test_allow_delete_access_to_groupdn(topo, _add_user, _aci_of_user): def test_allow_add_access_to_anyone(topo, _add_user, _aci_of_user): - """ - Test to allow add access to anyone + """Test to allow add access to anyone + :id: 5ca31cc4-68e0-11e8-8666-8c16451d917b :setup: topo.standalone :steps: @@ -160,8 +160,8 @@ def test_allow_add_access_to_anyone(topo, _add_user, _aci_of_user): def test_allow_delete_access_to_anyone(topo, _add_user, _aci_of_user): - """ - Test to allow delete access to anyone + """Test to allow delete access to anyone + :id: f5447c7e-68e1-11e8-84c4-8c16451d917b :setup: server :steps: @@ -191,8 +191,8 @@ def test_allow_delete_access_to_anyone(topo, _add_user, _aci_of_user): def test_allow_delete_access_not_to_userdn(topo, _add_user, _aci_of_user): - """ - Test to Allow delete access to != userdn + """Test to Allow delete access to != userdn + :id: 00637f6e-68e3-11e8-92a3-8c16451d917b :setup: server :steps: @@ -224,8 +224,8 @@ def test_allow_delete_access_not_to_userdn(topo, _add_user, _aci_of_user): def test_allow_delete_access_not_to_group(topo, _add_user, _aci_of_user): - """ - Test to Allow delete access to != groupdn + """Test to Allow delete access to != groupdn + :id: f58fc8b0-68e5-11e8-9313-8c16451d917b :setup: server :steps: @@ -263,8 +263,8 @@ def test_allow_delete_access_not_to_group(topo, _add_user, _aci_of_user): def test_allow_add_access_to_parent(topo, _add_user, _aci_of_user): - """ - Test to Allow add privilege to parent + """Test to Allow add privilege to parent + :id: 9f099845-9dbc-412f-bdb9-19a5ea729694 :setup: server :steps: @@ -299,8 +299,8 @@ def test_allow_add_access_to_parent(topo, _add_user, _aci_of_user): def test_allow_delete_access_to_parent(topo, _add_user, _aci_of_user): - """ - Test to Allow delete access to parent + """Test to Allow delete access to parent + :id: 2dd7f624-68e7-11e8-8591-8c16451d917b :setup: server :steps: @@ -333,10 +333,10 @@ def test_allow_delete_access_to_parent(topo, _add_user, _aci_of_user): new_user.delete() -def test_allow_delete_access_to_dynamic_group(topo, _add_user, _aci_of_user): +def test_allow_delete_access_to_dynamic_group(topo, _add_user, _aci_of_user, request): + + """Test to Allow delete access to dynamic group - """ - Test to Allow delete access to dynamic group :id: 14ffa452-68ed-11e8-a60d-8c16451d917b :setup: server :steps: @@ -362,7 +362,7 @@ def test_allow_delete_access_to_dynamic_group(topo, _add_user, _aci_of_user): # Set ACI Domain(topo.standalone, DEFAULT_SUFFIX).\ add("aci", f'(target = ldap:///{DEFAULT_SUFFIX})(targetattr=*)' - f'(version 3.0; acl "$tet_thistest"; ' + f'(version 3.0; acl "{request.node.name}"; ' f'allow (delete) (groupdn = "ldap:///{group.dn}"); )') # create connection with USER_WITH_ACI_DELADD @@ -372,10 +372,10 @@ def test_allow_delete_access_to_dynamic_group(topo, _add_user, _aci_of_user): UserAccount(conn, USER_DELADD).delete() -def test_allow_delete_access_to_dynamic_group_uid(topo, _add_user, _aci_of_user): +def test_allow_delete_access_to_dynamic_group_uid(topo, _add_user, _aci_of_user, request): + + """Test to Allow delete access to dynamic group - """ - Test to Allow delete access to dynamic group :id: 010a4f20-752a-4173-b763-f520c7a85b82 :setup: server :steps: @@ -401,7 +401,7 @@ def test_allow_delete_access_to_dynamic_group_uid(topo, _add_user, _aci_of_user) # Set ACI Domain(topo.standalone, DEFAULT_SUFFIX).\ add("aci", f'(target = ldap:///{DEFAULT_SUFFIX})' - f'(targetattr=uid)(version 3.0; acl "$tet_thistest"; ' + f'(targetattr=uid)(version 3.0; acl "{request.node.name}"; ' f'allow (delete) (groupdn = "ldap:///{group.dn}"); )') # create connection with USER_WITH_ACI_DELADD @@ -411,10 +411,10 @@ def test_allow_delete_access_to_dynamic_group_uid(topo, _add_user, _aci_of_user) UserAccount(conn, USER_DELADD).delete() -def test_allow_delete_access_not_to_dynamic_group(topo, _add_user, _aci_of_user): +def test_allow_delete_access_not_to_dynamic_group(topo, _add_user, _aci_of_user, request): + + """Test to Allow delete access to != dynamic group - """ - Test to Allow delete access to != dynamic group :id: 9ecb139d-bca8-428e-9044-fd89db5a3d14 :setup: server :steps: @@ -439,7 +439,7 @@ def test_allow_delete_access_not_to_dynamic_group(topo, _add_user, _aci_of_user) # Set ACI Domain(topo.standalone, DEFAULT_SUFFIX).\ add("aci", f'(target = ldap:///{DEFAULT_SUFFIX})' - f'(targetattr=*)(version 3.0; acl "$tet_thistest"; ' + f'(targetattr=*)(version 3.0; acl "{request.node.name}"; ' f'allow (delete) (groupdn != "ldap:///{group.dn}"); )') # create connection with USER_WITH_ACI_DELADD diff --git a/dirsrvtests/tests/suites/acl/enhanced_aci_modrnd_test.py b/dirsrvtests/tests/suites/acl/enhanced_aci_modrnd_test.py index ca94569..d36ff57 100644 --- a/dirsrvtests/tests/suites/acl/enhanced_aci_modrnd_test.py +++ b/dirsrvtests/tests/suites/acl/enhanced_aci_modrnd_test.py @@ -75,13 +75,13 @@ def test_enhanced_aci_modrnd(topology_st, env_setup): :id: 492cf2a9-2efe-4e3b-955e-85eca61d66b9 :setup: Standalone instance :steps: - 1. Create two containers - 2. Create a user within "ou=test_ou_1,dc=example,dc=com" - 3. Add an aci with a rule "cn=test_user is allowed all" within these containers - 4. Run MODRDN operation on the "cn=test_user" and set "newsuperior" to - the "ou=test_ou_2,dc=example,dc=com" - 5. Check there is no user under container one (ou=test_ou_1,dc=example,dc=com) - 6. Check there is a user under container two (ou=test_ou_2,dc=example,dc=com) + 1. Create two containers + 2. Create a user within "ou=test_ou_1,dc=example,dc=com" + 3. Add an aci with a rule "cn=test_user is allowed all" within these containers + 4. Run MODRDN operation on the "cn=test_user" and set "newsuperior" to + the "ou=test_ou_2,dc=example,dc=com" + 5. Check there is no user under container one (ou=test_ou_1,dc=example,dc=com) + 6. Check there is a user under container two (ou=test_ou_2,dc=example,dc=com) :expectedresults: 1. Two containers should be created diff --git a/dirsrvtests/tests/suites/acl/keywords_test.py b/dirsrvtests/tests/suites/acl/keywords_test.py index 138e3ed..3a49b96 100644 --- a/dirsrvtests/tests/suites/acl/keywords_test.py +++ b/dirsrvtests/tests/suites/acl/keywords_test.py @@ -55,8 +55,7 @@ def _add_aci(topo, name): def test_user_binds_with_a_password_and_can_access_the_data(topo, add_user, aci_of_user): - """ - User binds with a password and can access the data as per the ACI. + """User binds with a password and can access the data as per the ACI. :id: f6c4b6f0-7ac4-11e8-a517-8c16451d917b :setup: Standalone Server @@ -78,8 +77,7 @@ def test_user_binds_with_a_password_and_can_access_the_data(topo, add_user, aci_ def test_user_binds_with_a_bad_password_and_cannot_access_the_data(topo, add_user, aci_of_user): - """ - User binds with a BAD password and cannot access the data . + """User binds with a BAD password and cannot access the data . :id: 0397744e-7ac5-11e8-bfb1-8c16451d917b :setup: Standalone Server @@ -98,8 +96,7 @@ def test_user_binds_with_a_bad_password_and_cannot_access_the_data(topo, add_use def test_anonymous_user_cannot_access_the_data(topo, add_user, aci_of_user): - """ - Anonymous user cannot access the data + """Anonymous user cannot access the data :id: 0821a55c-7ac5-11e8-b214-8c16451d917b :setup: Standalone Server @@ -124,8 +121,7 @@ def test_anonymous_user_cannot_access_the_data(topo, add_user, aci_of_user): def test_authenticated_but_has_no_rigth_on_the_data(topo, add_user, aci_of_user): - """ - User has a password. He is authenticated but has no rigth on the data. + """User has a password. He is authenticated but has no rigth on the data. :id: 11be7ebe-7ac5-11e8-b754-8c16451d917b :setup: Standalone Server @@ -150,10 +146,9 @@ def test_authenticated_but_has_no_rigth_on_the_data(topo, add_user, aci_of_user) def test_the_bind_client_is_accessing_the_directory(topo, add_user, aci_of_user): - """ - The bind rule is evaluated to be true if the client is accessing the directory as per the ACI. + """The bind rule is evaluated to be true if the client is accessing the directory as per the ACI. - :id: 1715bfb2-7ac5-11e8-8f2c-8c16451d917b + :id: 1715bfb2-7ac5-11e8-8f2c-8c16451d917b :setup: Standalone Server :steps: 1. Add test entry @@ -175,8 +170,7 @@ def test_the_bind_client_is_accessing_the_directory(topo, add_user, aci_of_user) def test_users_binds_with_a_password_and_can_access_the_data( topo, add_user, aci_of_user): - """ - User binds with a password and can access the data as per the ACI. + """User binds with a password and can access the data as per the ACI. :id: 1bd01cb4-7ac5-11e8-a2f1-8c16451d917b :setup: Standalone Server @@ -199,8 +193,7 @@ def test_users_binds_with_a_password_and_can_access_the_data( def test_user_binds_without_any_password_and_cannot_access_the_data(topo, add_user, aci_of_user): - """ - User binds without any password and cannot access the data + """User binds without any password and cannot access the data :id: 205777fa-7ac5-11e8-ba2f-8c16451d917b :setup: Standalone Server @@ -227,8 +220,7 @@ def test_user_binds_without_any_password_and_cannot_access_the_data(topo, add_us def test_user_can_access_the_data_when_connecting_from_any_machine( topo, add_user, aci_of_user ): - """ - User can access the data when connecting from any machine as per the ACI. + """User can access the data when connecting from any machine as per the ACI. :id: 28cbc008-7ac5-11e8-934e-8c16451d917b :setup: Standalone Server @@ -256,8 +248,8 @@ def test_user_can_access_the_data_when_connecting_from_any_machine( def test_user_can_access_the_data_when_connecting_from_internal_ds_network_only( topo, add_user, aci_of_user ): - """ - User can access the data when connecting from internal ICNC network only as per the ACI. + """User can access the data when connecting from internal ICNC network only as per the ACI. + :id: 2cac2136-7ac5-11e8-8328-8c16451d917b :setup: Standalone Server :steps: @@ -288,8 +280,7 @@ def test_user_can_access_the_data_when_connecting_from_internal_ds_network_only( def test_user_can_access_the_data_when_connecting_from_some_network_only( topo, add_user, aci_of_user ): - """ - User can access the data when connecting from some network only as per the ACI. + """User can access the data when connecting from some network only as per the ACI. :id: 3098512a-7ac5-11e8-af85-8c16451d917b :setup: Standalone Server @@ -317,8 +308,7 @@ def test_user_can_access_the_data_when_connecting_from_some_network_only( def test_from_an_unauthorized_network(topo, add_user, aci_of_user): - """ - User cannot access the data when connecting from an unauthorized network as per the ACI. + """User cannot access the data when connecting from an unauthorized network as per the ACI. :id: 34cf9726-7ac5-11e8-bc12-8c16451d917b :setup: Standalone Server @@ -345,8 +335,7 @@ def test_from_an_unauthorized_network(topo, add_user, aci_of_user): def test_user_cannot_access_the_data_when_connecting_from_an_unauthorized_network_2( topo, add_user, aci_of_user): - """ - User cannot access the data when connecting from an unauthorized network as per the ACI. + """User cannot access the data when connecting from an unauthorized network as per the ACI. :id: 396bdd44-7ac5-11e8-8014-8c16451d917b :setup: Standalone Server @@ -373,8 +362,8 @@ def test_user_cannot_access_the_data_when_connecting_from_an_unauthorized_networ def test_user_cannot_access_the_data_if_not_from_a_certain_domain(topo, add_user, aci_of_user): - """ - User cannot access the data if not from a certain domain as per the ACI. + """User cannot access the data if not from a certain domain as per the ACI. + :id: 3d658972-7ac5-11e8-930f-8c16451d917b :setup: Standalone Server :steps: @@ -402,8 +391,7 @@ def test_user_cannot_access_the_data_if_not_from_a_certain_domain(topo, add_user def test_dnsalias_keyword_test_nodns_cannot(topo, add_user, aci_of_user): - """ - Dnsalias Keyword NODNS_KEY cannot assess data as per the ACI. + """Dnsalias Keyword NODNS_KEY cannot assess data as per the ACI. :id: 41b467be-7ac5-11e8-89a3-8c16451d917b :setup: Standalone Server @@ -434,8 +422,7 @@ def test_dnsalias_keyword_test_nodns_cannot(topo, add_user, aci_of_user): @pytest.mark.bz1710848 @pytest.mark.parametrize("ip_addr", ['127.0.0.1', "[::1]"]) def test_user_can_access_from_ipv4_or_ipv6_address(topo, add_user, aci_of_user, ip_addr): - """ - User can modify the data when accessing the server from the allowed IPv4 and IPv6 addresses + """User can modify the data when accessing the server from the allowed IPv4 and IPv6 addresses :id: 461e761e-7ac5-11e8-9ae4-8c16451d917b :parametrized: yes diff --git a/dirsrvtests/tests/suites/acl/misc_test.py b/dirsrvtests/tests/suites/acl/misc_test.py index 8f122b7..3843df5 100644 --- a/dirsrvtests/tests/suites/acl/misc_test.py +++ b/dirsrvtests/tests/suites/acl/misc_test.py @@ -78,8 +78,8 @@ def clean(request, topo): def test_accept_aci_in_addition_to_acl(topo, clean, aci_of_user): - """ - Misc Test 2 accept aci in addition to acl + """Misc Test 2 accept aci in addition to acl + :id: 8e9408fa-7db8-11e8-adaa-8c16451d917b :setup: Standalone Instance :steps: @@ -115,9 +115,9 @@ def test_accept_aci_in_addition_to_acl(topo, clean, aci_of_user): @pytest.mark.bz334451 def test_more_then_40_acl_will_crash_slapd(topo, clean, aci_of_user): - """ - bug 334451 : more then 40 acl will crash slapd + """bug 334451 : more then 40 acl will crash slapd superseded by Bug 772778 - acl cache overflown problem with > 200 acis + :id: 93a44c60-7db8-11e8-9439-8c16451d917b :setup: Standalone Instance :steps: @@ -147,9 +147,9 @@ def test_more_then_40_acl_will_crash_slapd(topo, clean, aci_of_user): @pytest.mark.bz345643 def test_search_access_should_not_include_read_access(topo, clean, aci_of_user): - """ - bug 345643 + """bug 345643 Misc Test 4 search access should not include read access + :id: 98ab173e-7db8-11e8-a309-8c16451d917b :setup: Standalone Instance :steps: @@ -181,8 +181,8 @@ def test_search_access_should_not_include_read_access(topo, clean, aci_of_user): def test_only_allow_some_targetattr(topo, clean, aci_of_user): - """ - Misc Test 5 only allow some targetattr (1/2) + """Misc Test 5 only allow some targetattr (1/2) + :id: 9d27f048-7db8-11e8-a71c-8c16451d917b :setup: Standalone Instance :steps: @@ -219,9 +219,9 @@ def test_only_allow_some_targetattr(topo, clean, aci_of_user): i.delete() -def test_only_allow_some_targetattr_two(topo, clean, aci_of_user): - """ - Misc Test 6 only allow some targetattr (2/2)" +def test_only_allow_some_targetattr_two(topo, clean, aci_of_user, request): + """Misc Test 6 only allow some targetattr (2/2)" + :id: a188239c-7db8-11e8-903e-8c16451d917b :setup: Standalone Instance :steps: @@ -244,9 +244,9 @@ def test_only_allow_some_targetattr_two(topo, clean, aci_of_user): Domain(topo.standalone, DEFAULT_SUFFIX).\ replace("aci", '(target="ldap:///{}") (targetattr="mail||objectClass")' - '(targetfilter="cn=Anuj") (version 3.0; acl "$tet_thistest"; ' + '(targetfilter="cn=Anuj") (version 3.0; acl "{}"; ' 'allow (compare,read,search) ' - '(userdn = "ldap:///anyone"); )'.format(DEFAULT_SUFFIX)) + '(userdn = "ldap:///anyone"); )'.format(DEFAULT_SUFFIX, request.node.name)) conn = UserAccount(topo.standalone, user.dn).bind(PW_DM) # aci will allow only mail targetattr but only for cn=Anuj @@ -277,8 +277,8 @@ def test_only_allow_some_targetattr_two(topo, clean, aci_of_user): @pytest.mark.bz326000 def test_memberurl_needs_to_be_normalized(topo, clean, aci_of_user): - """ - Non-regression test for BUG 326000: MemberURL needs to be normalized + """Non-regression test for BUG 326000: MemberURL needs to be normalized + :id: a5d172e6-7db8-11e8-aca7-8c16451d917b :setup: Standalone Instance :steps: @@ -323,8 +323,8 @@ def test_memberurl_needs_to_be_normalized(topo, clean, aci_of_user): @pytest.mark.bz624370 def test_greater_than_200_acls_can_be_created(topo, clean, aci_of_user): - """ - Misc 10, check that greater than 200 ACLs can be created. Bug 624370 + """Misc 10, check that greater than 200 ACLs can be created. Bug 624370 + :id: ac020252-7db8-11e8-8652-8c16451d917b :setup: Standalone Instance :steps: @@ -355,8 +355,8 @@ def test_greater_than_200_acls_can_be_created(topo, clean, aci_of_user): @pytest.mark.bz624453 def test_server_bahaves_properly_with_very_long_attribute_names(topo, clean, aci_of_user): - """ - Make sure the server bahaves properly with very long attribute names. Bug 624453. + """Make sure the server bahaves properly with very long attribute names. Bug 624453. + :id: b0d31942-7db8-11e8-a833-8c16451d917b :setup: Standalone Instance :steps: @@ -378,24 +378,23 @@ def test_server_bahaves_properly_with_very_long_attribute_names(topo, clean, aci def test_do_bind_as_201_distinct_users(topo, clean, aci_of_user): - """ - Do bind as 201 distinct users - Increase the nsslapd-aclpb-max-selected-acls in cn=ACL Plugin,cn=plugins,cn=config - Restart the server - Do bind as 201 distinct users + """Test bind as 201 distinct users + :id: c0060532-7db8-11e8-a124-8c16451d917b :setup: Standalone Instance :steps: - 1. Add test entry - 2. Add ACI - 3. User should follow ACI role + 1. Add test entries + 2. Increase the nsslapd-aclpb-max-selected-acls in cn=ACL Plugin,cn=plugins,cn=config + 3. Restart the server + 4. Do bind as 201 distinct users :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed + 1. Entries should be added + 2. Operation should succeed + 3. Operation should succeed + 4. Operation should succeed """ uas = UserAccounts(topo.standalone, DEFAULT_SUFFIX) - for i in range(50): + for i in range(201): user = uas.create_test_user(uid=i, gid=i) user.set('userPassword', PW_DM) diff --git a/dirsrvtests/tests/suites/acl/modify_test.py b/dirsrvtests/tests/suites/acl/modify_test.py index cf51e61..52755b0 100644 --- a/dirsrvtests/tests/suites/acl/modify_test.py +++ b/dirsrvtests/tests/suites/acl/modify_test.py @@ -55,8 +55,8 @@ def aci_of_user(request, topo): def test_allow_write_access_to_targetattr_with_a_single_attribute( topo, aci_of_user, cleanup_tree): - """ - Modify Test 1 Allow write access to targetattr with a single attribute + """Modify Test 1 Allow write access to targetattr with a single attribute + :id: 620d7b82-7abf-11e8-a4db-8c16451d917b :setup: server :steps: @@ -96,8 +96,8 @@ def test_allow_write_access_to_targetattr_with_a_single_attribute( def test_allow_write_access_to_targetattr_with_multiple_attibutes( topo, aci_of_user, cleanup_tree): - """ - Modify Test 2 Allow write access to targetattr with multiple attibutes + """Modify Test 2 Allow write access to targetattr with multiple attibutes + :id: 6b9f05c6-7abf-11e8-9ba1-8c16451d917b :setup: server :steps: @@ -137,8 +137,8 @@ def test_allow_write_access_to_targetattr_with_multiple_attibutes( def test_allow_write_access_to_userdn_all(topo, aci_of_user, cleanup_tree): - """ - Modify Test 3 Allow write access to userdn 'all' + """Modify Test 3 Allow write access to userdn 'all' + :id: 70c58818-7abf-11e8-afa1-8c16451d917b :setup: server :steps: @@ -181,8 +181,8 @@ def test_allow_write_access_to_userdn_all(topo, aci_of_user, cleanup_tree): def test_allow_write_access_to_userdn_with_wildcards_in_dn( topo, aci_of_user, cleanup_tree): - """ - Modify Test 4 Allow write access to userdn with wildcards in DN + """Modify Test 4 Allow write access to userdn with wildcards in DN + :id: 766c2312-7abf-11e8-b57d-8c16451d917b :setup: server :steps: @@ -220,8 +220,8 @@ def test_allow_write_access_to_userdn_with_wildcards_in_dn( def test_allow_write_access_to_userdn_with_multiple_dns(topo, aci_of_user, cleanup_tree): - """ - Modify Test 5 Allow write access to userdn with multiple DNs + """Modify Test 5 Allow write access to userdn with multiple DNs + :id: 7aae760a-7abf-11e8-bc3a-8c16451d917b :setup: server :steps: @@ -265,8 +265,8 @@ def test_allow_write_access_to_userdn_with_multiple_dns(topo, aci_of_user, clean def test_allow_write_access_to_target_with_wildcards(topo, aci_of_user, cleanup_tree): - """ - Modify Test 6 Allow write access to target with wildcards + """Modify Test 6 Allow write access to target with wildcards + :id: 825fe884-7abf-11e8-8541-8c16451d917b :setup: server :steps: @@ -310,9 +310,9 @@ def test_allow_write_access_to_target_with_wildcards(topo, aci_of_user, cleanup_ assert ua.get_attr_val('title') -def test_allow_write_access_to_userdnattr(topo, aci_of_user, cleanup_tree): - """ - Modify Test 7 Allow write access to userdnattr +def test_allow_write_access_to_userdnattr(topo, aci_of_user, cleanup_tree, request): + """Modify Test 7 Allow write access to userdnattr + :id: 86b418f6-7abf-11e8-ae28-8c16451d917b :setup: server :steps: @@ -324,7 +324,7 @@ def test_allow_write_access_to_userdnattr(topo, aci_of_user, cleanup_tree): 2. Operation should succeed 3. Operation should succeed """ - ACI_BODY = '(target = ldap:///{})(targetattr=*)(version 3.0; acl "$tet_thistest";allow (write) (userdn = "ldap:///anyone"); )'.format(DEFAULT_SUFFIX) + ACI_BODY = '(target = ldap:///{})(targetattr=*)(version 3.0; acl "{}";allow (write) (userdn = "ldap:///anyone"); )'.format(DEFAULT_SUFFIX, request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) for i in ['Product Development', 'Accounting']: @@ -355,18 +355,18 @@ def test_allow_write_access_to_userdnattr(topo, aci_of_user, cleanup_tree): def test_allow_selfwrite_access_to_anyone(topo, aci_of_user, cleanup_tree): - """ - Modify Test 8 Allow selfwrite access to anyone - :id: 8b3becf0-7abf-11e8-ac34-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. User should follow ACI role - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed + """Modify Test 8 Allow selfwrite access to anyone + + :id: 8b3becf0-7abf-11e8-ac34-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. User should follow ACI role + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed """ groups = Groups(topo.standalone, DEFAULT_SUFFIX) group = groups.create(properties={"cn": "group1", @@ -398,9 +398,9 @@ def test_allow_selfwrite_access_to_anyone(topo, aci_of_user, cleanup_tree): def test_uniquemember_should_also_be_the_owner(topo, aci_of_user): - """ - Modify Test 10 groupdnattr = \"ldap:///$BASEDN?owner\" if owner is a group, group's + """Modify Test 10 groupdnattr = \"ldap:///$BASEDN?owner\" if owner is a group, group's uniquemember should also be the owner + :id: 9456b2d4-7abf-11e8-829d-8c16451d917b :setup: server :steps: @@ -482,8 +482,8 @@ def test_uniquemember_should_also_be_the_owner(topo, aci_of_user): def test_aci_with_both_allow_and_deny(topo, aci_of_user, cleanup_tree): - """ - Modify Test 12 aci with both allow and deny + """Modify Test 12 aci with both allow and deny + :id: 9dcfe902-7abf-11e8-86dc-8c16451d917b :setup: server :steps: @@ -524,9 +524,9 @@ def test_aci_with_both_allow_and_deny(topo, aci_of_user, cleanup_tree): UserAccount(conn, USER_WITH_ACI_DELADD).get_attr_val('uid') -def test_allow_owner_to_modify_entry(topo, aci_of_user, cleanup_tree): - """ - Modify Test 14 allow userdnattr = owner to modify entry +def test_allow_owner_to_modify_entry(topo, aci_of_user, cleanup_tree, request): + """Modify Test 14 allow userdnattr = owner to modify entry + :id: aa302090-7abf-11e8-811a-8c16451d917b :setup: server :steps: @@ -544,7 +544,7 @@ def test_allow_owner_to_modify_entry(topo, aci_of_user, cleanup_tree): 'ou': 'groups'}) grp.set('owner', USER_WITH_ACI_DELADD) - ACI_BODY = '(target ="ldap:///cn=intranet, {}") (targetattr ="*")(targetfilter ="(objectclass=groupOfUniqueNames)") (version 3.0;acl "$tet_thistest";allow(read, write, delete, search, compare, add) (userdnattr = "owner");)'.format(DEFAULT_SUFFIX) + ACI_BODY = '(target ="ldap:///cn=intranet, {}") (targetattr ="*")(targetfilter ="(objectclass=groupOfUniqueNames)") (version 3.0;acl "{}";allow(read, write, delete, search, compare, add) (userdnattr = "owner");)'.format(DEFAULT_SUFFIX, request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) for i in ['Product Development', 'Accounting']: diff --git a/dirsrvtests/tests/suites/acl/modrdn_test.py b/dirsrvtests/tests/suites/acl/modrdn_test.py index f67f3e5..1fbc7f2 100644 --- a/dirsrvtests/tests/suites/acl/modrdn_test.py +++ b/dirsrvtests/tests/suites/acl/modrdn_test.py @@ -87,9 +87,9 @@ def _add_user(request, topo): request.addfinalizer(fin) -def test_allow_write_privilege_to_anyone(topo, _add_user, aci_of_user): - """ - Modrdn Test 1 Allow write privilege to anyone +def test_allow_write_privilege_to_anyone(topo, _add_user, aci_of_user, request): + """Modrdn Test 1 Allow write privilege to anyone + :id: 4406f12e-7932-11e8-9dea-8c16451d917b :setup: server :steps: @@ -102,8 +102,8 @@ def test_allow_write_privilege_to_anyone(topo, _add_user, aci_of_user): 3. Operation should succeed """ Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", - '(target ="ldap:///{}")(targetattr=*)(version 3.0;acl "$tet_thistest";allow ' - '(write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX)) + '(target ="ldap:///{}")(targetattr=*)(version 3.0;acl "{}";allow ' + '(write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX, request.node.name)) conn = Anonymous(topo.standalone).bind() # Allow write privilege to anyone useraccount = UserAccount(conn, USER_WITH_ACI_DELADD) @@ -115,22 +115,22 @@ def test_allow_write_privilege_to_anyone(topo, _add_user, aci_of_user): def test_allow_write_privilege_to_dynamic_group_with_scope_set_to_base_in_ldap_url( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): + """Modrdn Test 2 Allow write privilege to DYNAMIC_MODRDN group with scope set to base in LDAP URL + + :id: 4c0f8c00-7932-11e8-8398-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. User should follow ACI role + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed """ - Modrdn Test 2 Allow write privilege to DYNAMIC_MODRDN group with scope set to base in LDAP URL - :id: 4c0f8c00-7932-11e8-8398-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. User should follow ACI role - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - """ - Domain(topo.standalone, DEFAULT_SUFFIX).add("aci",'(target = ldap:///{})(targetattr=*)(version 3.0; acl "$tet_thistest"; allow(all)(groupdn = "ldap:///{}"); )'.format(DEFAULT_SUFFIX, DYNAMIC_MODRDN)) + Domain(topo.standalone, DEFAULT_SUFFIX).add("aci",'(target = ldap:///{})(targetattr=*)(version 3.0; acl "{}"; allow(all)(groupdn = "ldap:///{}"); )'.format(DEFAULT_SUFFIX, request.node.name, DYNAMIC_MODRDN)) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) # Allow write privilege to DYNAMIC_MODRDN group with scope set to base in LDAP URL useraccount = UserAccount(conn, USER_DELADD) @@ -141,22 +141,22 @@ def test_allow_write_privilege_to_dynamic_group_with_scope_set_to_base_in_ldap_u assert 'cn=Jeff Vedder,ou=Product Development,dc=example,dc=com' == useraccount.dn -def test_write_access_to_naming_atributes(topo, _add_user, aci_of_user): - """ - Test for write access to naming atributes (1) - Test that check for add writes to the new naming attr - :id: 532fc630-7932-11e8-8924-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. User should follow ACI role - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed +def test_write_access_to_naming_atributes(topo, _add_user, aci_of_user, request): + """Test for write access to naming atributes + Test that check for add writes to the new naming attr + + :id: 532fc630-7932-11e8-8924-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. User should follow ACI role + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed """ - Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", '(target ="ldap:///{}")(targetattr != "uid")(version 3.0;acl "$tet_thistest";allow (write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX)) + Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", '(target ="ldap:///{}")(targetattr != "uid")(version 3.0;acl "{}";allow (write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX, request.node.name)) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) #Test for write access to naming atributes useraccount = UserAccount(conn, USER_WITH_ACI_DELADD) @@ -164,23 +164,23 @@ def test_write_access_to_naming_atributes(topo, _add_user, aci_of_user): useraccount.rename("uid=Jeffbo Vedder") -def test_write_access_to_naming_atributes_two(topo, _add_user, aci_of_user): - """ - Test for write access to naming atributes (2) - :id: 5a2077d2-7932-11e8-9e7b-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. User should follow ACI role - 4. Now try to modrdn it to cn, won't work if request deleteoldrdn. - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - 4. Operation should not succeed +def test_write_access_to_naming_atributes_two(topo, _add_user, aci_of_user, request): + """Test for write access to naming atributes (2) + + :id: 5a2077d2-7932-11e8-9e7b-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. User should follow ACI role + 4. Now try to modrdn it to cn, won't work if request deleteoldrdn. + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed + 4. Operation should not succeed """ - Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", '(target ="ldap:///{}")(targetattr != "uid")(version 3.0;acl "$tet_thistest";allow (write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX)) + Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", '(target ="ldap:///{}")(targetattr != "uid")(version 3.0;acl "{}";allow (write) (userdn = "ldap:///anyone");)'.format(DEFAULT_SUFFIX, request.node.name)) properties = { 'uid': 'Sam Carter1', 'cn': 'Sam Carter1', @@ -202,22 +202,22 @@ def test_write_access_to_naming_atributes_two(topo, _add_user, aci_of_user): @pytest.mark.bz950351 def test_access_aci_list_contains_any_deny_rule(topo, _add_user, aci_of_user): - """ - Testing bug #950351: RHDS denies MODRDN access if ACI list contains any DENY rule - Bug description: If you create a deny ACI for some or more attributes there is incorrect behaviour - as you cannot rename the entry anymore - :id: 62cbbb8a-7932-11e8-96a7-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Adding a new ou ou=People to $BASEDN - 3. Adding a user NEWENTRY9_MODRDN to ou=People,$BASEDN - 4. Adding an allow rule for NEWENTRY9_MODRDN and for others an aci deny rule - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - 4. Operation should succeed + """RHDS denies MODRDN access if ACI list contains any DENY rule + Bug description: If you create a deny ACI for some or more attributes there is incorrect behaviour + as you cannot rename the entry anymore + + :id: 62cbbb8a-7932-11e8-96a7-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Adding a new ou ou=People to $BASEDN + 3. Adding a user NEWENTRY9_MODRDN to ou=People,$BASEDN + 4. Adding an allow rule for NEWENTRY9_MODRDN and for others an aci deny rule + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed + 4. Operation should succeed """ properties = { 'uid': 'NEWENTRY9_MODRDN', @@ -245,28 +245,28 @@ def test_access_aci_list_contains_any_deny_rule(topo, _add_user, aci_of_user): def test_renaming_target_entry(topo, _add_user, aci_of_user): - """ - Test for renaming target entry - :id: 6be1d33a-7932-11e8-9115-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Create a test user entry - 3.Create a new ou entry with an aci - 4. Make sure uid=$MYUID has the access - 5. Rename ou=OU0 to ou=OU1 - 6. Create another ou=OU2 - 7. Move ou=OU1 under ou=OU2 - 8. Make sure uid=$MYUID still has the access - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - 4. Operation should succeed - 5. Operation should succeed - 6. Operation should succeed - 7. Operation should succeed - 8. Operation should succeed + """Test for renaming target entry + + :id: 6be1d33a-7932-11e8-9115-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Create a test user entry + 3. Create a new ou entry with an aci + 4. Make sure uid=$MYUID has the access + 5. Rename ou=OU0 to ou=OU1 + 6. Create another ou=OU2 + 7. Move ou=OU1 under ou=OU2 + 8. Make sure uid=$MYUID still has the access + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed + 4. Operation should succeed + 5. Operation should succeed + 6. Operation should succeed + 7. Operation should succeed + 8. Operation should succeed """ properties = { 'uid': 'TRAC340_MODRDN', diff --git a/dirsrvtests/tests/suites/acl/search_real_part2_test.py b/dirsrvtests/tests/suites/acl/search_real_part2_test.py index a01e0ce..64f1187 100644 --- a/dirsrvtests/tests/suites/acl/search_real_part2_test.py +++ b/dirsrvtests/tests/suites/acl/search_real_part2_test.py @@ -68,6 +68,7 @@ def test_uer(request, topo): def test_deny_all_access_with__target_set_on_non_leaf(topo, test_uer, aci_of_user): """Search Test 11 Deny all access with != target set on non-leaf + :id: f1c5d72a-6e11-11e8-aa9d-8c16451d917b :setup: Standalone Instance :steps: @@ -102,6 +103,7 @@ def test_deny_all_access_with__target_set_on_wildcard_non_leaf( topo, test_uer, aci_of_user ): """Search Test 12 Deny all access with != target set on wildcard non-leaf + :id: 02f34640-6e12-11e8-a382-8c16451d917b :setup: Standalone Instance :steps: @@ -137,6 +139,7 @@ def test_deny_all_access_with__target_set_on_wildcard_leaf( topo, test_uer, aci_of_user ): """Search Test 13 Deny all access with != target set on wildcard leaf + :id: 16c54d76-6e12-11e8-b5ba-8c16451d917b :setup: Standalone Instance :steps: @@ -172,6 +175,7 @@ def test_deny_all_access_with_targetfilter_using_equality_search( topo, test_uer, aci_of_user ): """Search Test 14 Deny all access with targetfilter using equality search + :id: 27255e04-6e12-11e8-8e35-8c16451d917b :setup: Standalone Instance :steps: @@ -207,6 +211,7 @@ def test_deny_all_access_with_targetfilter_using_equality_search_two( topo, test_uer, aci_of_user ): """Test that Search Test 15 Deny all access with targetfilter using != equality search + :id: 3966bcd4-6e12-11e8-83ce-8c16451d917b :setup: Standalone Instance :steps: @@ -242,6 +247,7 @@ def test_deny_all_access_with_targetfilter_using_substring_search( topo, test_uer, aci_of_user ): """Test that Search Test 16 Deny all access with targetfilter using substring search + :id: 44d7b4ba-6e12-11e8-b420-8c16451d917b :setup: Standalone Instance :steps: @@ -277,6 +283,7 @@ def test_deny_all_access_with_targetfilter_using_substring_search_two( topo, test_uer, aci_of_user ): """Test that Search Test 17 Deny all access with targetfilter using != substring search + :id: 55b12d98-6e12-11e8-8cf4-8c16451d917b :setup: Standalone Instance :steps: @@ -310,9 +317,10 @@ def test_deny_all_access_with_targetfilter_using_substring_search_two( def test_deny_all_access_with_targetfilter_using_boolean_or_of_two_equality_search( - topo, test_uer, aci_of_user + topo, test_uer, aci_of_user, request ): """Search Test 18 Deny all access with targetfilter using boolean OR of two equality search + :id: 29cc35fa-793f-11e8-988f-8c16451d917b :setup: Standalone Instance :steps: @@ -329,8 +337,8 @@ def test_deny_all_access_with_targetfilter_using_boolean_or_of_two_equality_sear 5. Operation should success """ Domain(topo.standalone, DEFAULT_SUFFIX).add("aci",'(target = ldap:///{})(targetattr = "*")' - '(targetfilter = (|(cn=scarter)(cn=jvaughan)))(version 3.0; acl "$tet_thistest"; ' - 'deny absolute (all) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX)) + '(targetfilter = (|(cn=scarter)(cn=jvaughan)))(version 3.0; acl "{}"; ' + 'deny absolute (all) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX, request.node.name)) UserAccount(topo.standalone, USER_ANANDA).set("cn", "scarter") UserAccount(topo.standalone, USER_ANUJ).set("cn", "jvaughan") conn = UserAccount(topo.standalone, USER_ANANDA).bind(PW_DM) @@ -350,6 +358,7 @@ def test_deny_all_access_with_targetfilter_using_boolean_or_of_two_equality_sear def test_deny_all_access_to__userdn_two(topo, test_uer, aci_of_user): """Search Test 19 Deny all access to != userdn + :id: 693496c0-6e12-11e8-80dc-8c16451d917b :setup: Standalone Instance :steps: @@ -381,8 +390,8 @@ def test_deny_all_access_to__userdn_two(topo, test_uer, aci_of_user): def test_deny_all_access_with_userdn(topo, test_uer, aci_of_user): - """ - Search Test 20 Deny all access with userdn + """Search Test 20 Deny all access with userdn + :id: 75aada86-6e12-11e8-bd34-8c16451d917b :setup: Standalone Instance :steps: @@ -416,8 +425,8 @@ def test_deny_all_access_with_userdn(topo, test_uer, aci_of_user): def test_deny_all_access_with_targetfilter_using_presence_search( topo, test_uer, aci_of_user ): - """ - Search Test 21 Deny all access with targetfilter using presence search + """Search Test 21 Deny all access with targetfilter using presence search + :id: 85244a42-6e12-11e8-9480-8c16451d917b :setup: Standalone Instance :steps: diff --git a/dirsrvtests/tests/suites/acl/search_real_part3_test.py b/dirsrvtests/tests/suites/acl/search_real_part3_test.py index 9903a9f..f4df7c5 100644 --- a/dirsrvtests/tests/suites/acl/search_real_part3_test.py +++ b/dirsrvtests/tests/suites/acl/search_real_part3_test.py @@ -69,8 +69,8 @@ def test_uer(request, topo): def test_deny_search_access_to_userdn_with_ldap_url(topo, test_uer, aci_of_user): - """ - Search Test 23 Deny search access to userdn with LDAP URL + """Search Test 23 Deny search access to userdn with LDAP URL + :id: 94f082d8-6e12-11e8-be72-8c16451d917b :setup: Standalone Instance :steps: @@ -105,8 +105,8 @@ def test_deny_search_access_to_userdn_with_ldap_url(topo, test_uer, aci_of_user) def test_deny_search_access_to_userdn_with_ldap_url_two(topo, test_uer, aci_of_user): - """ - Search Test 24 Deny search access to != userdn with LDAP URL + """Search Test 24 Deny search access to != userdn with LDAP URL + :id: a1ee05d2-6e12-11e8-8260-8c16451d917b :setup: Standalone Instance :steps: @@ -143,8 +143,8 @@ def test_deny_search_access_to_userdn_with_ldap_url_two(topo, test_uer, aci_of_u def test_deny_search_access_to_userdn_with_ldap_url_matching_all_users( topo, test_uer, aci_of_user ): - """ - Search Test 25 Deny search access to userdn with LDAP URL matching all users + """Search Test 25 Deny search access to userdn with LDAP URL matching all users + :id: b37f72ae-6e12-11e8-9c98-8c16451d917b :setup: Standalone Instance :steps: @@ -176,8 +176,8 @@ def test_deny_search_access_to_userdn_with_ldap_url_matching_all_users( def test_deny_read_access_to_a_dynamic_group(topo, test_uer, aci_of_user): - """ - Search Test 26 Deny read access to a dynamic group + """Search Test 26 Deny read access to a dynamic group + :id: c0c5290e-6e12-11e8-a900-8c16451d917b :setup: Standalone Instance :steps: @@ -217,8 +217,8 @@ def test_deny_read_access_to_a_dynamic_group(topo, test_uer, aci_of_user): def test_deny_read_access_to_dynamic_group_with_host_port_set_on_ldap_url( topo, test_uer, aci_of_user ): - """ - Search Test 27 Deny read access to dynamic group with host:port set on LDAP URL + """Search Test 27 Deny read access to dynamic group with host:port set on LDAP URL + :id: ceb62158-6e12-11e8-8c36-8c16451d917b :setup: Standalone Instance :steps: @@ -258,8 +258,8 @@ def test_deny_read_access_to_dynamic_group_with_host_port_set_on_ldap_url( def test_deny_read_access_to_dynamic_group_with_scope_set_to_one_in_ldap_url( topo, test_uer, aci_of_user ): - """ - Search Test 28 Deny read access to dynamic group with scope set to "one" in LDAP URL + """Search Test 28 Deny read access to dynamic group with scope set to "one" in LDAP URL + :id: ddb30432-6e12-11e8-94db-8c16451d917b :setup: Standalone Instance :steps: @@ -298,8 +298,8 @@ def test_deny_read_access_to_dynamic_group_with_scope_set_to_one_in_ldap_url( def test_deny_read_access_to_dynamic_group_two(topo, test_uer, aci_of_user): - """ - Search Test 29 Deny read access to != dynamic group + """Search Test 29 Deny read access to != dynamic group + :id: eae2a6c6-6e12-11e8-80f3-8c16451d917b :setup: Standalone Instance :steps: @@ -340,10 +340,10 @@ def test_deny_read_access_to_dynamic_group_two(topo, test_uer, aci_of_user): def test_deny_access_to_group_should_deny_access_to_all_uniquemember( - topo, test_uer, aci_of_user + topo, test_uer, aci_of_user, request ): - """ - Search Test 38 Deny access to group should deny access to all uniquemember (including chain group) + """Search Test 38 Deny access to group should deny access to all uniquemember (including chain group) + :id: 56b470e4-7941-11e8-912b-8c16451d917b :setup: Standalone Instance :steps: @@ -382,7 +382,7 @@ def test_deny_access_to_group_should_deny_access_to_all_uniquemember( }) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", '(target = ldap:///{})(targetattr=*)' - '(version 3.0; acl "$tet_thistest"; deny(read)(groupdn = "ldap:///cn=Nested Group 1, {}"); )'.format(DEFAULT_SUFFIX, DEFAULT_SUFFIX)) + '(version 3.0; acl "{}"; deny(read)(groupdn = "ldap:///cn=Nested Group 1, {}"); )'.format(DEFAULT_SUFFIX, request.node.name, DEFAULT_SUFFIX)) conn = UserAccount(topo.standalone, USER_ANANDA).bind(PW_DM) # deny_access_to_group_should_deny_access_to_all_uniquemember assert 0 == len(Accounts(conn, DEFAULT_SUFFIX).filter('(cn=*)')) @@ -394,8 +394,8 @@ def test_deny_access_to_group_should_deny_access_to_all_uniquemember( def test_entry_with_lots_100_attributes(topo, test_uer, aci_of_user): - """ - Search Test 39 entry with lots (>100) attributes + """Search Test 39 entry with lots (>100) attributes + :id: fc155f74-6e12-11e8-96ac-8c16451d917b :setup: Standalone Instance :steps: @@ -425,8 +425,8 @@ def test_entry_with_lots_100_attributes(topo, test_uer, aci_of_user): @pytest.mark.bz301798 def test_groupdnattr_value_is_another_group(topo): - """ - Search Test 42 groupdnattr value is another group test #1 + """Search Test 42 groupdnattr value is another group test #1 + :id: 52299e16-7944-11e8-b471-8c16451d917b :setup: server :steps: diff --git a/dirsrvtests/tests/suites/acl/search_real_test.py b/dirsrvtests/tests/suites/acl/search_real_test.py index e2b8ff4..c0bfcbf 100644 --- a/dirsrvtests/tests/suites/acl/search_real_test.py +++ b/dirsrvtests/tests/suites/acl/search_real_test.py @@ -69,6 +69,7 @@ def test_uer(request, topo): def test_deny_all_access_with_target_set(topo, test_uer, aci_of_user): """Test that Deny all access with target set + :id: 0550e680-6e0e-11e8-82f4-8c16451d917b :setup: Standalone Instance :steps: @@ -101,6 +102,7 @@ def test_deny_all_access_with_target_set(topo, test_uer, aci_of_user): def test_deny_all_access_to_a_target_with_wild_card(topo, test_uer, aci_of_user): """Search Test 2 Deny all access to a target with wild card + :id: 1c370f98-6e11-11e8-9f10-8c16451d917b :setup: Standalone Instance :steps: @@ -135,6 +137,7 @@ def test_deny_all_access_to_a_target_with_wild_card(topo, test_uer, aci_of_user) def test_deny_all_access_without_a_target_set(topo, test_uer, aci_of_user): """Search Test 3 Deny all access without a target set + :id: 2dbeb36a-6e11-11e8-ab9f-8c16451d917b :setup: Standalone Instance :steps: @@ -169,6 +172,7 @@ def test_deny_read_search_and_compare_access_with_target_and_targetattr_set( topo, test_uer, aci_of_user ): """Search Test 4 Deny read, search and compare access with target and targetattr set + :id: 3f4a87e4-6e11-11e8-a09f-8c16451d917b :setup: Standalone Instance :steps: @@ -201,6 +205,7 @@ def test_deny_read_search_and_compare_access_with_target_and_targetattr_set( def test_deny_read_access_to_multiple_groupdns(topo, test_uer, aci_of_user): """Search Test 6 Deny read access to multiple groupdn's + :id: 8f3ba440-6e11-11e8-8b20-8c16451d917b :setup: Standalone Instance :steps: @@ -251,6 +256,7 @@ def test_deny_read_access_to_multiple_groupdns(topo, test_uer, aci_of_user): def test_deny_all_access_to_userdnattr(topo, test_uer, aci_of_user): """Search Test 7 Deny all access to userdnattr" + :id: ae482494-6e11-11e8-ae33-8c16451d917b :setup: Standalone Instance :steps: @@ -283,8 +289,9 @@ def test_deny_all_access_to_userdnattr(topo, test_uer, aci_of_user): UserAccount(topo.standalone, USER_ANUJ).remove('manager', USER_ANANDA) -def test_deny_all_access_with__target_set(topo, test_uer, aci_of_user): +def test_deny_all_access_with__target_set(topo, test_uer, aci_of_user, request): """Search Test 8 Deny all access with != target set + :id: bc00aed0-6e11-11e8-be66-8c16451d917b :setup: Standalone Instance :steps: @@ -301,7 +308,7 @@ def test_deny_all_access_with__target_set(topo, test_uer, aci_of_user): 5. Operation should success """ Domain(topo.standalone, DEFAULT_SUFFIX).add("aci",'(target != "ldap:///{}")(targetattr = "*")' - '(version 3.0; acl "$tet_thistest"; deny absolute (all) (userdn = "ldap:///anyone") ;)'.format(USER_ANANDA)) + '(version 3.0; acl "{}"; deny absolute (all) (userdn = "ldap:///anyone") ;)'.format(USER_ANANDA, request.node.name)) conn = UserAccount(topo.standalone, USER_ANANDA).bind(PW_DM) # aci will not block USER_ANANDA will block others assert 1 == len(Accounts(conn, DEFAULT_SUFFIX).filter('(cn=*)')) @@ -314,6 +321,7 @@ def test_deny_all_access_with__target_set(topo, test_uer, aci_of_user): def test_deny_all_access_with__targetattr_set(topo, test_uer, aci_of_user): """Search Test 9 Deny all access with != targetattr set + :id: d2d73b2e-6e11-11e8-ad3d-8c16451d917b :setup: Standalone Instance :steps: @@ -364,6 +372,7 @@ def test_deny_all_access_with__targetattr_set(topo, test_uer, aci_of_user): def test_deny_all_access_with_targetattr_set(topo, test_uer, aci_of_user): """Search Test 10 Deny all access with targetattr set + :id: e1602ff2-6e11-11e8-8e55-8c16451d917b :setup: Standalone Instance :steps: diff --git a/dirsrvtests/tests/suites/acl/selfdn_permissions_test.py b/dirsrvtests/tests/suites/acl/selfdn_permissions_test.py index af75013..9298458 100644 --- a/dirsrvtests/tests/suites/acl/selfdn_permissions_test.py +++ b/dirsrvtests/tests/suites/acl/selfdn_permissions_test.py @@ -90,8 +90,8 @@ def test_selfdn_permission_add(topology_st, allow_user_init): :id: e837a9ef-be92-48da-ad8b-ebf42b0fede1 :setup: Standalone instance, add a entry which is used to bind, - enable acl error logging by setting 'nsslapd-errorlog-level' to '128', - remove aci's to start with a clean slate, and add dummy entries + enable acl error logging by setting 'nsslapd-errorlog-level' to '128', + remove aci's to start with a clean slate, and add dummy entries :steps: 1. Check we can not ADD an entry without the proper SELFDN aci 2. Check with the proper ACI we can not ADD with 'member' attribute @@ -191,8 +191,8 @@ def test_selfdn_permission_search(topology_st, allow_user_init): :id: 06d51ef9-c675-4583-99b2-4852dbda190e :setup: Standalone instance, add a entry which is used to bind, - enable acl error logging by setting 'nsslapd-errorlog-level' to '128', - remove aci's to start with a clean slate, and add dummy entries + enable acl error logging by setting 'nsslapd-errorlog-level' to '128', + remove aci's to start with a clean slate, and add dummy entries :steps: 1. Check we can not search an entry without the proper SELFDN aci 2. Add proper ACI @@ -241,8 +241,8 @@ def test_selfdn_permission_modify(topology_st, allow_user_init): :id: 97a58844-095f-44b0-9029-dd29a7d83d68 :setup: Standalone instance, add a entry which is used to bind, - enable acl error logging by setting 'nsslapd-errorlog-level' to '128', - remove aci's to start with a clean slate, and add dummy entries + enable acl error logging by setting 'nsslapd-errorlog-level' to '128', + remove aci's to start with a clean slate, and add dummy entries :steps: 1. Check we can not modify an entry without the proper SELFDN aci 2. Add proper ACI @@ -300,8 +300,8 @@ def test_selfdn_permission_delete(topology_st, allow_user_init): :id: 0ec4c0ec-e7b0-4ef1-8373-ab25aae34516 :setup: Standalone instance, add a entry which is used to bind, - enable acl error logging by setting 'nsslapd-errorlog-level' to '128', - remove aci's to start with a clean slate, and add dummy entries + enable acl error logging by setting 'nsslapd-errorlog-level' to '128', + remove aci's to start with a clean slate, and add dummy entries :steps: 1. Check we can not delete an entry without the proper SELFDN aci 2. Add proper ACI @@ -309,6 +309,7 @@ def test_selfdn_permission_delete(topology_st, allow_user_init): :expectedresults: 1. Operation should be successful 2. Operation should be successful + 3. Operation should be successful """ topology_st.standalone.log.info("\n\n######################### DELETE ######################\n") diff --git a/dirsrvtests/tests/suites/acl/valueacl_part2_test.py b/dirsrvtests/tests/suites/acl/valueacl_part2_test.py index 5f5b1c6..e25c5cc 100644 --- a/dirsrvtests/tests/suites/acl/valueacl_part2_test.py +++ b/dirsrvtests/tests/suites/acl/valueacl_part2_test.py @@ -107,10 +107,10 @@ def _add_user(request, topo): request.addfinalizer(fin) -def test_we_can_search_as_expected(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) +def test_we_can_search_as_expected(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can search as expected + :id: e845dbba-7aa9-11e8-8988-8c16451d917b :setup: server :steps: @@ -124,8 +124,8 @@ def test_we_can_search_as_expected(topo, _add_user, aci_of_user): """ ACI_BODY = '(target="ldap:///cn=*,ou=Product Development, {}")' \ '(targetfilter="cn=Jeff*")(targetattr="secretary || objectclass || mail")' \ - '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "$tet_thistest"; ' \ - 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX) + '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "{}"; ' \ + 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX, request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = Anonymous(topo.standalone).bind() # aci will allow secretary , mail , objectclass @@ -135,11 +135,11 @@ def test_we_can_search_as_expected(topo, _add_user, aci_of_user): assert user.get_attr_vals('objectclass') -def test_we_can_mod_title_as_expected(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the +def test_we_can_mod_title_as_expected(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Test search will work with targattrfilters present." + Test search will work with targattrfilters present. + :id: f8c1ea88-7aa9-11e8-a55c-8c16451d917b :setup: server :steps: @@ -153,8 +153,8 @@ def test_we_can_mod_title_as_expected(topo, _add_user, aci_of_user): """ ACI_BODY = '(target="ldap:///cn=*,ou=Product Development, {}")' \ '(targetfilter="cn=Jeff*")(targetattr="secretary || objectclass || mail")' \ - '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "$tet_thistest"; ' \ - 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX) + '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "{}"; ' \ + 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX, request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) # aci will not allow 'title', 'topdog' conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -163,11 +163,11 @@ def test_we_can_mod_title_as_expected(topo, _add_user, aci_of_user): user.add('title', 'topdog') -def test_modify_with_multiple_filters(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the +def test_modify_with_multiple_filters(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Allowed by multiple." + Allowed by multiple filters + :id: fd9d223e-7aa9-11e8-a83b-8c16451d917b :setup: server :steps: @@ -181,9 +181,9 @@ def test_modify_with_multiple_filters(topo, _add_user, aci_of_user): """ ACI_BODY = '(targattrfilters = "add=title:(title=architect) && secretary:' \ '(secretary=cn=Meylan,{}), del=title:(title=architect) && secretary:' \ - '(secretary=cn=Meylan,{})")(version 3.0; acl "$tet_thistest"; allow (write) ' \ + '(secretary=cn=Meylan,{})")(version 3.0; acl "{}"; allow (write) ' \ '(userdn = "ldap:///anyone") ;)'.format( - DEFAULT_SUFFIX, DEFAULT_SUFFIX + DEFAULT_SUFFIX, DEFAULT_SUFFIX, request.node.name ) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -195,11 +195,11 @@ def test_modify_with_multiple_filters(topo, _add_user, aci_of_user): assert user.get_attr_val('secretary') -def test_denied_by_multiple_filters(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_denied_by_multiple_filters(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Denied by multiple filters." + Denied by multiple filters + :id: 034c6c62-7aaa-11e8-8634-8c16451d917b :setup: server :steps: @@ -213,8 +213,8 @@ def test_denied_by_multiple_filters(topo, _add_user, aci_of_user): """ ACI_BODY = '(targattrfilters = "add=title:(title=architect) && secretary:' \ '(secretary=cn=Meylan,{}), del=title:(title=architect) && secretary:' \ - '(secretary=cn=Meylan,{})")(version 3.0; acl "$tet_thistest"; allow (write) ' \ - '(userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX, DEFAULT_SUFFIX) + '(secretary=cn=Meylan,{})")(version 3.0; acl "{}"; allow (write) ' \ + '(userdn = "ldap:///anyone") ;)'.format(DEFAULT_SUFFIX, DEFAULT_SUFFIX, request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) # aci will allow title some attribute only @@ -228,11 +228,11 @@ def test_denied_by_multiple_filters(topo, _add_user, aci_of_user): user.add("secretary", "cn=Grenoble,dc=example,dc=com") -def test_allowed_add_one_attribute(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_allowed_add_one_attribute(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Allowed add one attribute (in presence of multiple filters)" + Allowed add one attribute (in presence of multiple filters) + :id: 086c7f0c-7aaa-11e8-b69f-8c16451d917b :setup: server :steps: @@ -245,9 +245,9 @@ def test_allowed_add_one_attribute(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=architect) && secretary:(secretary=cn=Meylan, {}), ' \ - 'del=title:(title=architect) && secretary:(secretary=cn=Meylan, {})")(version 3.0; acl "$tet_thistest"; ' \ + 'del=title:(title=architect) && secretary:(secretary=cn=Meylan, {})")(version 3.0; acl "{}"; ' \ 'allow (write) (userdn = "ldap:///{}") ;)'.format( - DEFAULT_SUFFIX, DEFAULT_SUFFIX, USER_WITH_ACI_DELADD) + DEFAULT_SUFFIX, DEFAULT_SUFFIX, request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) user = UserAccount(conn, USER_DELADD) @@ -258,12 +258,12 @@ def test_allowed_add_one_attribute(topo, _add_user, aci_of_user): def test_cannot_add_an_entry_with_attribute_values_we_are_not_allowed_add( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Test not allowed add an entry" + Test not allowed add an entry + :id: 0d0effee-7aaa-11e8-b673-8c16451d917b :setup: server :steps: @@ -277,8 +277,8 @@ def test_cannot_add_an_entry_with_attribute_values_we_are_not_allowed_add( """ ACI_BODY = '(targattrfilters = "add=title:(|(title=engineer)(title=cool dude)(title=scum)) ' \ '&& secretary:(secretary=cn=Meylan, {}), del=title:(|(title=engineer)(title=cool dude)' \ - '(title=scum))")(version 3.0; aci "$tet_thistest"; allow (add) userdn = "ldap:///{}";)'.format( - DEFAULT_SUFFIX, DEFAULT_SUFFIX) + '(title=scum))")(version 3.0; aci "{}"; allow (add) userdn = "ldap:///{}";)'.format( + DEFAULT_SUFFIX, request.node.name, DEFAULT_SUFFIX) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) properties = { 'uid': 'FRED', @@ -298,11 +298,11 @@ def test_cannot_add_an_entry_with_attribute_values_we_are_not_allowed_add( user.add("objectclass", "person") -def test_on_modrdn(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_on_modrdn(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that valuacls kick in for modrdn operation. + :id: 12985dde-7aaa-11e8-abde-8c16451d917b :setup: server :steps: @@ -315,8 +315,8 @@ def test_on_modrdn(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(target="ldap:///cn=*,ou=Accounting,{}")(targattrfilters = "add=cn:(|(cn=engineer)), ' \ - 'del=title:(|(title=engineer)(title=cool dude)(title=scum))")(version 3.0; aci "$tet_thistest"; ' \ - 'allow (write) userdn = "ldap:///{}";)'.format(DEFAULT_SUFFIX, USER_WITH_ACI_DELADD) + 'del=title:(|(title=engineer)(title=cool dude)(title=scum))")(version 3.0; aci "{}"; ' \ + 'allow (write) userdn = "ldap:///{}";)'.format(DEFAULT_SUFFIX, request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) # modrdn_s is not allowed with ou=OU1 @@ -325,11 +325,11 @@ def test_on_modrdn(topo, _add_user, aci_of_user): useraccount.rename("ou=OU1") -def test_on_modrdn_allow(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the attributes being +def test_on_modrdn_allow(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Test modrdn still works (2)" + Test modrdn still works (2) + :id: 17720562-7aaa-11e8-82ee-8c16451d917b :setup: server :steps: @@ -342,8 +342,8 @@ def test_on_modrdn_allow(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(target="ldap:///{}")(targattrfilters = "add=cn:((cn=engineer)), del=cn:((cn=jonny))")' \ - '(version 3.0; aci "$tet_thistest"; allow (write) ' \ - 'userdn = "ldap:///{}";)'.format(DEFAULT_SUFFIX, USER_WITH_ACI_DELADD) + '(version 3.0; aci "{}"; allow (write) ' \ + 'userdn = "ldap:///{}";)'.format(DEFAULT_SUFFIX, request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) properties = { 'uid': 'jonny', @@ -364,12 +364,12 @@ def test_on_modrdn_allow(topo, _add_user, aci_of_user): @pytest.mark.bz979515 def test_targattrfilters_keyword(topo): - """ - Testing the targattrfilters keyword that allows access control based on the value + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) "Bug #979515 - ACLs inoperative in some search scenarios [rhel-6.5]" "Bug #979516 is a clone for DS8.2 on RHEL5.9" "Bug #979514 is a clone for RHEL6.4 zStream errata" + :id: 23f9e9d0-7aaa-11e8-b16b-8c16451d917b :setup: server :steps: diff --git a/dirsrvtests/tests/suites/acl/valueacl_test.py b/dirsrvtests/tests/suites/acl/valueacl_test.py index 54bc134..cbb731b 100644 --- a/dirsrvtests/tests/suites/acl/valueacl_test.py +++ b/dirsrvtests/tests/suites/acl/valueacl_test.py @@ -167,10 +167,10 @@ class _AddFREDWithRoot: def test_delete_an_attribute_value_we_are_not_allowed_to_delete( topo, _add_user, aci_of_user ): - """ - Testing the targattrfilters keyword that allows access control based on the value + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can MODIFY:add an attribute value we are allowed to add + :id: 7c41baa6-7aa9-11e8-9bdc-8c16451d917b :setup: server :steps: @@ -192,12 +192,12 @@ def test_delete_an_attribute_value_we_are_not_allowed_to_delete( def test_donot_allow_write_access_to_title_if_value_is_not_architect( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we cannot MODIFY:add an attribute value we are not allowed to add + :id: 822c607e-7aa9-11e8-b2e7-8c16451d917b :setup: server :steps: @@ -210,7 +210,7 @@ def test_donot_allow_write_access_to_title_if_value_is_not_architect( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=architect), del=title:(title=architect)")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) (userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(version 3.0; acl "{}"; allow (write) (userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) # aci will allow to add title architect conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -221,12 +221,12 @@ def test_donot_allow_write_access_to_title_if_value_is_not_architect( def test_delete_an_attribute_value_we_are_allowed_to_delete( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - Test that we can MODIFY:delete an attribute value we are allowed to delete, + Test that we can MODIFY:delete an attribute value we are allowed to delete + :id: 86f36b34-7aa9-11e8-ab16-8c16451d917b :setup: server :steps: @@ -239,7 +239,7 @@ def test_delete_an_attribute_value_we_are_allowed_to_delete( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=architect), del=title:(title=architect)")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) (userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(version 3.0; acl "{}"; allow (write) (userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() # aci will allow to delete title architect @@ -249,12 +249,12 @@ def test_delete_an_attribute_value_we_are_allowed_to_delete( def test_delete_an_attribute_value_we_are_not_allowed_to_deleted( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - Test that we cannot MODIFY:delete an attribute value we are allowed to delete, + Test that we cannot MODIFY:delete an attribute value we are allowed to delete + :id: 8c9f3a90-7aa9-11e8-bf2e-8c16451d917b :setup: server :steps: @@ -267,7 +267,7 @@ def test_delete_an_attribute_value_we_are_not_allowed_to_deleted( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=architect), del=title:(title=architect)")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) (userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(version 3.0; acl "{}"; allow (write) (userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "engineer").add() # acl will not allow to delete title engineer @@ -276,11 +276,11 @@ def test_delete_an_attribute_value_we_are_not_allowed_to_deleted( _ModTitleArchitectJeffVedder(topo, "engineer", conn).delete() -def test_allow_modify_replace(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_allow_modify_replace(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can MODIFY:replace an attribute if we have correct add/delete rights. + :id: 9148a234-7aa9-11e8-a1f1-8c16451d917b :setup: server :steps: @@ -293,8 +293,8 @@ def test_allow_modify_replace(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect)' \ - '(title=idiot))")(version 3.0; acl "$tet_thistest"; ' \ - 'allow (write) (userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(title=idiot))")(version 3.0; acl "{}"; ' \ + 'allow (write) (userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "idiot").add() @@ -305,11 +305,11 @@ def test_allow_modify_replace(topo, _add_user, aci_of_user): _ModTitleArchitectJeffVedder(topo, "engineer", conn).delete() -def test_allow_modify_delete(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_allow_modify_delete(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - "Valueacl Test $tet_thistest Don't Allow modify:replace because of lack of delete rights" + Don't Allow modify:replace because of lack of delete rights + :id: 962842d2-7aa9-11e8-b39e-8c16451d917b :setup: server :steps: @@ -322,8 +322,8 @@ def test_allow_modify_delete(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect))")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) ' \ - '(userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(version 3.0; acl "{}"; allow (write) ' \ + '(userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "idiot").add() @@ -335,11 +335,11 @@ def test_allow_modify_delete(topo, _add_user, aci_of_user): _ModTitleArchitectJeffVedder(topo, "idiot", conn).delete() -def test_replace_an_attribute_if_we_lack(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_replace_an_attribute_if_we_lack(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we cannot MODIFY:replace an attribute if we lack + :id: 9b1e6afa-7aa9-11e8-ac5b-8c16451d917b :setup: server :steps: @@ -352,8 +352,8 @@ def test_replace_an_attribute_if_we_lack(topo, _add_user, aci_of_user): 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect))")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) ' \ - '(userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(version 3.0; acl "{}"; allow (write) ' \ + '(userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "idiot").add() @@ -365,13 +365,13 @@ def test_replace_an_attribute_if_we_lack(topo, _add_user, aci_of_user): def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_value( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the - attributes being added (or deleted)) + """Testing the targattrfilters keyword that allows access control based on the value of the + attributes being added (or deleted)) Test that we can use MODIFY:delete to entirely remove an attribute if we have del rights to all attr values negative case tested next. + :id: a0c9e0c4-7aa9-11e8-8880-8c16451d917b :setup: server :steps: @@ -384,8 +384,8 @@ def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_value( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect)' \ - '(title=idiot))")(version 3.0; acl "$tet_thistest"; allow (write)' \ - ' (userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(title=idiot))")(version 3.0; acl "{}"; allow (write)' \ + ' (userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "idiot").add() @@ -395,13 +395,13 @@ def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_value( def test_remove_an_attribute_if_we_donot_have_del_rights_to_all_attr_value( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can use MODIFY:delete to entirely remove an attribute if we have not del rights to all attr values + :id: a6862eaa-7aa9-11e8-8bf9-8c16451d917b :setup: server :steps: @@ -414,8 +414,8 @@ def test_remove_an_attribute_if_we_donot_have_del_rights_to_all_attr_value( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect)' \ - '(title=idiot))")(version 3.0; acl "$tet_thistest"; allow (write) ' \ - '(userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(title=idiot))")(version 3.0; acl "{}"; allow (write) ' \ + '(userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "sailor").add() @@ -426,12 +426,12 @@ def test_remove_an_attribute_if_we_donot_have_del_rights_to_all_attr_value( def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_values( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can use MODIFY:replace to entirely remove an attribute if we have del rights to all attr values + :id: ab04c7e8-7aa9-11e8-84db-8c16451d917b :setup: server :steps: @@ -444,8 +444,8 @@ def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_values( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=engineer), del=title:(|(title=architect)' \ - '(title=idiot))")(version 3.0; acl "$tet_thistest"; allow (write) ' \ - '(userdn = "ldap:///{}") ;)'.format(USER_WITH_ACI_DELADD) + '(title=idiot))")(version 3.0; acl "{}"; allow (write) ' \ + '(userdn = "ldap:///{}") ;)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "architect").add() _AddTitleWithRoot(topo, "idiot").add() @@ -455,12 +455,12 @@ def test_remove_an_attribute_if_we_have_del_rights_to_all_attr_values( def test_cantnot_delete_an_entry_with_attribute_values_we_are_not_allowed_delete( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) - Test we cannot DELETE an entry with attribute values we are not allowed delete, + Test we cannot DELETE an entry with attribute values we are not allowed delete + :id: b525d94c-7aa9-11e8-8539-8c16451d917b :setup: server :steps: @@ -474,7 +474,7 @@ def test_cantnot_delete_an_entry_with_attribute_values_we_are_not_allowed_delete """ ACI_BODY = '(targattrfilters = "add=title:(|(title=engineer)(title=cool dude)(title=scum)), ' \ 'del=title:(|(title=engineer)(title=cool dude)(title=scum))")(version 3.0; ' \ - 'aci "$tet_thistest"; allow (delete) userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + 'aci "{}"; allow (delete) userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddFREDWithRoot(topo, "engineer", "cool dude", "ANuj").create() conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -484,12 +484,12 @@ def test_cantnot_delete_an_entry_with_attribute_values_we_are_not_allowed_delete def test_we_can_add_and_delete_an_entry_with_attribute_values_we_are_allowed_add_and_delete( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test we can DELETE an entry with attribute values we are allowed delete + :id: ba138e54-7aa9-11e8-8037-8c16451d917b :setup: server :steps: @@ -503,7 +503,7 @@ def test_we_can_add_and_delete_an_entry_with_attribute_values_we_are_allowed_add """ ACI_BODY = '(targattrfilters = "add=title:(|(title=engineer)(title=cool dude)(title=scum)), ' \ 'del=title:(|(title=engineer)(title=cool dude)(title=scum))")(version 3.0; ' \ - 'aci "$tet_thistest"; allow (delete) userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + 'aci "{}"; allow (delete) userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddFREDWithRoot(topo, "engineer", "cool dude", "scum").create() conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -511,12 +511,12 @@ def test_we_can_add_and_delete_an_entry_with_attribute_values_we_are_allowed_add UserAccount(conn, FRED).delete() -def test_allow_title(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_allow_title(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that if attr appears in targetattr and in targattrfilters then targattrfilters applies--ie. targattrfilters is a refinement of targattrfilters. + :id: beadf328-7aa9-11e8-bb08-8c16451d917b :setup: server :steps: @@ -530,8 +530,8 @@ def test_allow_title(topo, _add_user, aci_of_user): """ ACI_BODY = '(targetattr="title")(targattrfilters = "add=title:(|(title=engineer)' \ '(title=cool dude)(title=scum)), del=title:(|(title=engineer)(title=cool dude)' \ - '(title=scum))")(version 3.0; aci "$tet_thistest"; allow (write) ' \ - 'userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + '(title=scum))")(version 3.0; aci "{}"; allow (write) ' \ + 'userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "engineer").add() _AddTitleWithRoot(topo, "cool dude").add() @@ -541,11 +541,11 @@ def test_allow_title(topo, _add_user, aci_of_user): _ModTitleArchitectJeffVedder(topo, "topdog", conn).add() -def test_allow_to_modify(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of the +def test_allow_to_modify(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that I can have secretary in targetattr and title in targattrfilters. + :id: c32e4704-7aa9-11e8-951d-8c16451d917b :setup: server :steps: @@ -559,8 +559,8 @@ def test_allow_to_modify(topo, _add_user, aci_of_user): """ ACI_BODY = '(targetattr="secretary")(targattrfilters = "add=title:(|(title=engineer)' \ '(title=cool dude)(title=scum)), del=title:(|(title=engineer)(title=cool dude)' \ - '(title=scum))")(version 3.0; aci "$tet_thistest"; allow (write)' \ - ' userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + '(title=scum))")(version 3.0; aci "{}"; allow (write)' \ + ' userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "engineer").add() _AddTitleWithRoot(topo, "cool dude").add() @@ -571,11 +571,11 @@ def test_allow_to_modify(topo, _add_user, aci_of_user): assert user.get_attr_val('secretary') -def test_selfwrite_does_not_confer_write_on_a_targattrfilters_atribute(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of +def test_selfwrite_does_not_confer_write_on_a_targattrfilters_atribute(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Selfwrite does not confer "write" on a targattrfilters atribute. + :id: c7b9ec2e-7aa9-11e8-ba4a-8c16451d917b :setup: server :steps: @@ -589,7 +589,7 @@ def test_selfwrite_does_not_confer_write_on_a_targattrfilters_atribute(topo, _ad """ ACI_BODY = '(targattrfilters = "add=title:(|(title=engineer)(title=cool dude)(title=scum)), ' \ 'del=title:(|(title=engineer)(title=cool dude)(title=scum))")(version 3.0; ' \ - 'aci "$tet_thistest"; allow (selfwrite) userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + 'aci "{}"; allow (selfwrite) userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) # aci will not allow to add selfwrite_does_not_confer_write_on_a_targattrfilters_atribute conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -598,12 +598,12 @@ def test_selfwrite_does_not_confer_write_on_a_targattrfilters_atribute(topo, _ad def test_selfwrite_continues_to_give_rights_to_attr_in_targetattr_list( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Selfwrite continues to give rights to attr in targetattr list. + :id: cd287680-7aa9-11e8-a8e2-8c16451d917b :setup: server :steps: @@ -617,8 +617,8 @@ def test_selfwrite_continues_to_give_rights_to_attr_in_targetattr_list( """ ACI_BODY = '(targetattr="secretary")(targattrfilters = "add=title:(|(title=engineer)' \ '(title=cool dude)(title=scum)), del=title:(|(title=engineer)(title=cool dude)' \ - '(title=scum))")(version 3.0; aci "$tet_thistest"; allow (selfwrite) ' \ - 'userdn = "ldap:///{}";)'.format(USER_WITH_ACI_DELADD) + '(title=scum))")(version 3.0; aci "{}"; allow (selfwrite) ' \ + 'userdn = "ldap:///{}";)'.format(request.node.name, USER_WITH_ACI_DELADD) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) # selfwrite_continues_to_give_rights_to_attr_in_targetattr_list conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -627,12 +627,12 @@ def test_selfwrite_continues_to_give_rights_to_attr_in_targetattr_list( def test_add_an_attribute_value_we_are_allowed_to_add_with_ldapanyone( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can MODIFY:add an attribute value we are allowed to add with ldap:///anyone + :id: d1e1d7ac-7aa9-11e8-b968-8c16451d917b :setup: server :steps: @@ -645,7 +645,7 @@ def test_add_an_attribute_value_we_are_allowed_to_add_with_ldapanyone( 3. Operation should succeed """ ACI_BODY = '(targattrfilters = "add=title:(title=architect), del=title:(title=architect)")' \ - '(version 3.0; acl "$tet_thistest"; allow (write) userdn = "ldap:///anyone";)' + '(version 3.0; acl "{}"; allow (write) userdn = "ldap:///anyone";)'.format(request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) _AddTitleWithRoot(topo, "engineer").add() # aci will allow to add title architect @@ -653,12 +653,12 @@ def test_add_an_attribute_value_we_are_allowed_to_add_with_ldapanyone( _ModTitleArchitectJeffVedder(topo, "architect", conn).add() -def test_hierarchy(topo, _add_user, aci_of_user): - """ - Testing the targattrfilters keyword that allows access control based on the value of +def test_hierarchy(topo, _add_user, aci_of_user, request): + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that with two targattrfilters in the hierarchy that the general one applies. - This is the correct behaviour, even if it's a bit + This is the correct behaviour, even if it's a bit confusing + :id: d7ae354a-7aa9-11e8-8b0d-8c16451d917b :setup: server :steps: @@ -670,10 +670,10 @@ def test_hierarchy(topo, _add_user, aci_of_user): 2. Operation should succeed 3. Operation should succeed """ - ACI_BODY = '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "$tet_thistest"; ' \ - 'allow (write) (userdn = "ldap:///anyone") ;)' + ACI_BODY = '(targattrfilters = "add=title:(title=arch*)")(version 3.0; acl "{}"; ' \ + 'allow (write) (userdn = "ldap:///anyone") ;)'.format(request.node.name) ACI_BODY1 = '(targattrfilters = "add=title:(title=architect)")(version 3.0; ' \ - 'acl "$tet_thistest"; allow (write) (userdn = "ldap:///anyone") ;)' + 'acl "{}"; allow (write) (userdn = "ldap:///anyone") ;)'.format(request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY1) _AddTitleWithRoot(topo, "engineer").add() @@ -686,12 +686,12 @@ def test_hierarchy(topo, _add_user, aci_of_user): def test_targattrfilters_and_search_permissions_and_that_ldapmodify_works_as_expected( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of the + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can have targattrfilters and search permissions and that ldapmodify works as expected. + :id: ddae7a22-7aa9-11e8-ad6b-8c16451d917b :setup: server :steps: @@ -704,8 +704,8 @@ def test_targattrfilters_and_search_permissions_and_that_ldapmodify_works_as_exp 3. Operation should succeed """ ACI_BODY = '(targetattr="secretary || objectclass || mail")(targattrfilters = "add=title:' \ - '(title=arch*)")(version 3.0; acl "$tet_thistest"; ' \ - 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)' + '(title=arch*)")(version 3.0; acl "{}"; ' \ + 'allow (write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) # aci will allow to add title architect conn = UserAccount(topo.standalone, USER_WITH_ACI_DELADD).bind(PW_DM) @@ -713,12 +713,12 @@ def test_targattrfilters_and_search_permissions_and_that_ldapmodify_works_as_exp def test_targattrfilters_and_search_permissions_and_that_ldapmodify_works_as_expected_two( - topo, _add_user, aci_of_user + topo, _add_user, aci_of_user, request ): - """ - Testing the targattrfilters keyword that allows access control based on the value of + """Testing the targattrfilters keyword that allows access control based on the value of the attributes being added (or deleted)) Test that we can have targattrfilters and search permissions and that ldapsearch works as expected. + :id: e25d116e-7aa9-11e8-81d8-8c16451d917b :setup: server :steps: @@ -731,8 +731,8 @@ def test_targattrfilters_and_search_permissions_and_that_ldapmodify_works_as_exp 3. Operation should succeed """ ACI_BODY = '(targetattr="secretary || objectclass || mail")(targattrfilters = ' \ - '"add=title:(title=arch*)")(version 3.0; acl "$tet_thistest"; allow ' \ - '(write,read,search,compare) (userdn = "ldap:///anyone") ;)' + '"add=title:(title=arch*)")(version 3.0; acl "{}"; allow ' \ + '(write,read,search,compare) (userdn = "ldap:///anyone") ;)'.format(request.node.name) Domain(topo.standalone, DEFAULT_SUFFIX).add("aci", ACI_BODY) conn = Anonymous(topo.standalone).bind() user = UserAccount(conn, USER_DELADD) diff --git a/dirsrvtests/tests/suites/attr_encryption/attr_encryption_test.py b/dirsrvtests/tests/suites/attr_encryption/attr_encryption_test.py index 694bab8..201e797 100644 --- a/dirsrvtests/tests/suites/attr_encryption/attr_encryption_test.py +++ b/dirsrvtests/tests/suites/attr_encryption/attr_encryption_test.py @@ -60,6 +60,7 @@ def enable_user_attr_encryption(topo, request): def test_basic(topo, enable_user_attr_encryption): """Tests encrypted attributes with a test user entry + :id: d767d5c8-b934-4b14-9774-bd13480d81b3 :setup: Standalone instance Enable AES encryption config on employeenumber @@ -70,7 +71,7 @@ def test_basic(topo, enable_user_attr_encryption): 2. Check employeenumber encryption enabled 3. Check telephoneNumber encryption enabled 4. Check that encrypted attribute is present for user i.e. telephonenumber - :expectedresults: + :expectedresults: 1. This should be successful 2. This should be successful 3. This should be successful @@ -101,6 +102,7 @@ def test_basic(topo, enable_user_attr_encryption): def test_export_import_ciphertext(topo, enable_user_attr_encryption): """Configure attribute encryption, store some data, check that we can export the ciphertext + :id: b433e215-2926-48a5-818f-c21abc40fc2d :setup: Standalone instance Enable AES encryption config on employeenumber @@ -162,6 +164,7 @@ def test_export_import_ciphertext(topo, enable_user_attr_encryption): def test_export_import_plaintext(topo, enable_user_attr_encryption): """Configure attribute encryption, store some data, check that we can export the plain text + :id: b171e215-0456-48a5-245f-c21abc40fc2d :setup: Standalone instance Enable AES encryption config on employeenumber @@ -221,6 +224,7 @@ def test_export_import_plaintext(topo, enable_user_attr_encryption): def test_attr_encryption_unindexed(topo, enable_user_attr_encryption): """Configure attribute encryption for an un-indexed attribute, check that we can export encrypted data + :id: d3ef38e1-bb5a-44d8-a3a4-4a25a57e3454 :setup: Standalone instance Enable AES encryption config on employeenumber @@ -257,6 +261,7 @@ def test_attr_encryption_unindexed(topo, enable_user_attr_encryption): def test_attr_encryption_multiple_backends(topo, enable_user_attr_encryption): """Tests Configuration of attribute encryption for multiple backends Where both the backends have attribute encryption + :id: 9ece3e6c-96b7-4dd5-b092-d76dda23472d :setup: Standalone instance SSL Enabled @@ -357,6 +362,7 @@ def test_attr_encryption_multiple_backends(topo, enable_user_attr_encryption): def test_attr_encryption_backends(topo, enable_user_attr_encryption): """Tests Configuration of attribute encryption for single backend where more backends are present + :id: f3ef40e1-17d6-44d8-a3a4-4a25a57e9064 :setup: Standalone instance SSL Enabled diff --git a/dirsrvtests/tests/suites/automember_plugin/basic_test.py b/dirsrvtests/tests/suites/automember_plugin/basic_test.py index dd1c8e5..4ee373c 100644 --- a/dirsrvtests/tests/suites/automember_plugin/basic_test.py +++ b/dirsrvtests/tests/suites/automember_plugin/basic_test.py @@ -346,8 +346,7 @@ def test_custom_config_area(topo, _create_all_entries): @pytest.mark.bz834053 def test_ability_to_control_behavior_of_modifiers_name(topo, _create_all_entries): - """ - Control behaviour of modifier's name + """Control behaviour of modifier's name :id: 4ff16370-e7ff-11e8-838d-8c16451d917b :setup: Instance with replication @@ -359,7 +358,7 @@ def test_ability_to_control_behavior_of_modifiers_name(topo, _create_all_entries 5. Check the modifiersname in the user entry 6. Check the internalModifiersname in the user entry 7. Unset nsslapd-plugin-binddn-tracking attribute under - cn=config and delete the test enteries + cn=config and delete the test enteries :expected results: 1. Should success 2. Should success @@ -476,7 +475,7 @@ def test_multi_valued_automemberdefaultgroup_for_hostgroups(topo, _create_all_en def test_plugin_creates_member_attributes_of_the_automemberdefaultgroup(topo, _create_all_entries): """Checking whether plugin creates member attributes if it already - exists for some of the autoMemberDefaultGroup + exists for some of the autoMemberDefaultGroup :id: 4ff3ba76-e7ff-11e8-9846-8c16451d917b :setup: Instance with replication @@ -661,8 +660,7 @@ LIST_FOR_PARAMETERIZATION = [ @pytest.mark.parametrize("testid, uid, gid, role, uid2, gid2, m_grp", LIST_FOR_PARAMETERIZATION) def test_matching_gid_role_inclusive_regular_expression(topo, _create_all_entries, testid, uid, gid, role, uid2, gid2, m_grp): - """ - Matching gid nos and Role for the Inclusive regular expression + """Matching gid nos and Role for the Inclusive regular expression :id: 4ff71ce8-e7ff-11e8-b69b-8c16451d917b :parametrized: yes @@ -702,8 +700,7 @@ LIST_FOR_PARAMETERIZATION = [ def test_gid_and_role_inclusive_exclusive_regular_expression(topo, _create_all_entries, testid, uid, gid, role, c_grp, m_grp, number): - """ - Matching gid nos and Role for the Inclusive and Exclusive regular expression + """Matching gid nos and Role for the Inclusive and Exclusive regular expression :id: 4ff7d160-e7ff-11e8-8fbc-8c16451d917b :parametrized: yes @@ -742,8 +739,7 @@ LIST_FOR_PARAMETERIZATION = [ def test_managers_contractors_exclusive_regex_rules_member_uid(topo, _create_all_entries, testid, uid, gid, role, c_grp, m_grp): - """ - Match both managers and contractors exclusive regex rules + """Match both managers and contractors exclusive regex rules :id: 4ff8be18-e7ff-11e8-94aa-8c16451d917b :parametrized: yes @@ -776,8 +772,7 @@ LIST_FOR_PARAMETERIZATION = [ @pytest.mark.parametrize("testid, uid, gid, role, c_grp, m_grp", LIST_FOR_PARAMETERIZATION) def test_managers_inclusive_regex_rule(topo, _create_all_entries, testid, uid, gid, role, c_grp, m_grp): - """ - Match managers inclusive regex rule, and no + """Match managers inclusive regex rule, and no inclusive/exclusive Contractors regex rules :id: 4ff8d862-e7ff-11e8-b688-8c16451d917b @@ -805,8 +800,7 @@ def test_managers_inclusive_regex_rule(topo, _create_all_entries, def test_reject_invalid_config_and_we_donot_deadlock_the_server(topo, _create_all_entries): - """ - Verify DS reject invalid config, and we don't deadlock the server + """Verify DS reject invalid config, and we don't deadlock the server :id: 4ff90c38-e7ff-11e8-b72a-8c16451d917b :setup: Instance with replication @@ -1182,4 +1176,4 @@ def test_automemtask_run_export(topo, _create_all_entries, _startuptask, _fixtur if __name__ == "__main__": CURRENT_FILE = os.path.realpath(__file__) - pytest.main("-s -v %s" % CURRENT_FILE) \ No newline at end of file + pytest.main("-s -v %s" % CURRENT_FILE) diff --git a/dirsrvtests/tests/suites/automember_plugin/configuration_test.py b/dirsrvtests/tests/suites/automember_plugin/configuration_test.py index 0f9cc49..8256cc9 100644 --- a/dirsrvtests/tests/suites/automember_plugin/configuration_test.py +++ b/dirsrvtests/tests/suites/automember_plugin/configuration_test.py @@ -18,8 +18,8 @@ pytestmark = pytest.mark.tier1 @pytest.mark.bz834056 def test_configuration(topo): - """ - Automembership plugin and mixed in the plugin configuration + """Automembership plugin and mixed in the plugin configuration + :id: 45a5a8f8-e800-11e8-ab16-8c16451d917b :setup: Single Instance :steps: diff --git a/dirsrvtests/tests/suites/backups/backup_test.py b/dirsrvtests/tests/suites/backups/backup_test.py index e938914..ebe88be 100644 --- a/dirsrvtests/tests/suites/backups/backup_test.py +++ b/dirsrvtests/tests/suites/backups/backup_test.py @@ -8,6 +8,8 @@ from lib389.topologies import topology_st as topo from lib389.backend import Backend from lib389.tasks import BackupTask, RestoreTask +pytestmark = pytest.mark.tier1 + DEBUGGING = os.getenv("DEBUGGING", default=False) if DEBUGGING: logging.getLogger(__name__).setLevel(logging.DEBUG) @@ -15,7 +17,6 @@ else: logging.getLogger(__name__).setLevel(logging.INFO) log = logging.getLogger(__name__) - def test_missing_backend(topo): """Test that an error is returned when a restore is performed for a backend that is no longer present. diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py index 44ffdd3..878cef7 100644 --- a/dirsrvtests/tests/suites/basic/basic_test.py +++ b/dirsrvtests/tests/suites/basic/basic_test.py @@ -7,10 +7,6 @@ # --- END COPYRIGHT BLOCK --- # -""" - :Requirement: Basic Directory Server Operations -""" - from subprocess import check_output, PIPE, run from lib389 import DirSrv from lib389.idm.user import UserAccounts @@ -937,7 +933,7 @@ def test_mod_def_rootdse_attr(topology_st, import_example_ldif, rootdse_attr): :id: c7831e04-f458-4e23-83c7-b6f66109f639 :parametrized: yes :setup: Standalone instance and we are using rootdse_attr fixture which -adds nsslapd-return-default-opattr attr with value of one operation attribute. + adds nsslapd-return-default-opattr attr with value of one operation attribute. :steps: 1. Make an ldapsearch for rootdse attribute @@ -1003,7 +999,7 @@ def test_basic_anonymous_search(topology_st, create_users): @pytest.mark.bz915801 def test_search_original_type(topology_st, create_users): """Test ldapsearch returning original attributes - using nsslapd-search-return-original-type-switch + using nsslapd-search-return-original-type-switch :id: d7831d04-f558-4e50-93c7-b6f77109f640 :setup: Standalone instance @@ -1095,7 +1091,7 @@ def test_critical_msg_on_empty_range_idl(topology_st): :setup: Standalone instance :steps: 1. Create an index for internationalISDNNumber. (attribute chosen because it is - unlikely that previous tests used it) + unlikely that previous tests used it) 2. telephoneNumber being indexed by default create 20 users without telephoneNumber 3. add a telephoneNumber value and delete it to trigger an empty index database 4. Do a search that triggers a range lookup on empty telephoneNumber @@ -1105,7 +1101,7 @@ def test_critical_msg_on_empty_range_idl(topology_st): 2. This should pass 3. This should pass 4. This should pass on normal build but could abort a debug build - 4. This should pass + 5. This should pass """ indexedAttr = 'internationalISDNNumber' @@ -1367,7 +1363,7 @@ def test_dscreate_ldapi(dscreate_long_instance): :id: 5d72d955-aff8-4741-8c9a-32c1c707cf1f :setup: None :steps: - 1. create an instance with a long serverId name, that open a ldapi connection + 1. Ccreate an instance with a long serverId name, that open a ldapi connection 2. Connect with ldapi, that hit 50581 and crash the instance :expectedresults: 1. Should succeeds diff --git a/dirsrvtests/tests/suites/config/autotuning_test.py b/dirsrvtests/tests/suites/config/autotuning_test.py index 5407612..9c8ad4c 100644 --- a/dirsrvtests/tests/suites/config/autotuning_test.py +++ b/dirsrvtests/tests/suites/config/autotuning_test.py @@ -133,8 +133,8 @@ def test_cache_autosize_non_zero(topo, autosize, autosize_split): :steps: 1. Set in the cn=config,cn=ldbm database,cn=plugins,cn=config: nsslapd-cache-autosize, nsslapd-cache-autosize-split to the next value pairs: - ('', ''), ('', '0'), ('10', '40'), ('', '40'), - ('10', ''), ('10', '40'), ('10', '0') + ('', ''), ('', '0'), ('10', '40'), ('', '40'), + ('10', ''), ('10', '40'), ('10', '0') '' - for deleting the value (set to default) 2. Try to modify nsslapd-dbcachesize and nsslapd-cachememsize to some real value, it should be rejected diff --git a/dirsrvtests/tests/suites/cos/cos_test.py b/dirsrvtests/tests/suites/cos/cos_test.py index d6a498c..3ee6d00 100644 --- a/dirsrvtests/tests/suites/cos/cos_test.py +++ b/dirsrvtests/tests/suites/cos/cos_test.py @@ -17,23 +17,24 @@ from lib389.idm.user import UserAccount pytestmark = pytest.mark.tier1 def test_positive(topo): - """ - :id: a5a74235-597f-4fe8-8c38-826860927472 - :setup: server - :steps: - 1. Add filter role entry - 2. Add ns container - 3. Add cos template - 4. Add CosClassic Definition - 5. Cos entries should be added and searchable - 6. employeeType attribute should be there in user entry as per the cos plugin property - :expectedresults: - 1. Operation should success - 2. Operation should success - 3. Operation should success - 4. Operation should success - 5. Operation should success - 6. Operation should success + """CoS positive tests + + :id: a5a74235-597f-4fe8-8c38-826860927472 + :setup: server + :steps: + 1. Add filter role entry + 2. Add ns container + 3. Add cos template + 4. Add CosClassic Definition + 5. Cos entries should be added and searchable + 6. employeeType attribute should be there in user entry as per the cos plugin property + :expectedresults: + 1. Operation should success + 2. Operation should success + 3. Operation should success + 4. Operation should success + 5. Operation should success + 6. Operation should success """ # Adding ns filter role roles = FilteredRoles(topo.standalone, DEFAULT_SUFFIX) diff --git a/dirsrvtests/tests/suites/cos/indirect_cos_test.py b/dirsrvtests/tests/suites/cos/indirect_cos_test.py index 4689297..def1cd0 100644 --- a/dirsrvtests/tests/suites/cos/indirect_cos_test.py +++ b/dirsrvtests/tests/suites/cos/indirect_cos_test.py @@ -150,7 +150,7 @@ def test_indirect_cos(topo, setup): :expectedresults: 1. User has expected cos attrs 2. Substree password policy setup is successful - 3 User still has expected cos attrs + 3. User still has expected cos attrs """ # Step 1 - Search user and see if the COS attrs are included diff --git a/dirsrvtests/tests/suites/disk_monitoring/disk_monitoring_test.py b/dirsrvtests/tests/suites/disk_monitoring/disk_monitoring_test.py index 6510db3..d433baf 100644 --- a/dirsrvtests/tests/suites/disk_monitoring/disk_monitoring_test.py +++ b/dirsrvtests/tests/suites/disk_monitoring/disk_monitoring_test.py @@ -108,8 +108,8 @@ def reset_logs(topo): @disk_monitoring_ack def test_verify_operation_when_disk_monitoring_is_off(topo, setup, reset_logs): - """ - Verify operation when Disk monitoring is off + """Verify operation when Disk monitoring is off + :id: 73a97536-fe9e-11e8-ba9f-8c16451d917b :setup: Standalone :steps: @@ -139,8 +139,8 @@ def test_verify_operation_when_disk_monitoring_is_off(topo, setup, reset_logs): @disk_monitoring_ack def test_free_up_the_disk_space_and_change_ds_config(topo, setup, reset_logs): - """ - Free up the disk space and change DS config + """Free up the disk space and change DS config + :id: 7be4d560-fe9e-11e8-a307-8c16451d917b :setup: Standalone :steps: @@ -170,8 +170,8 @@ def test_free_up_the_disk_space_and_change_ds_config(topo, setup, reset_logs): @disk_monitoring_ack def test_verify_operation_with_nsslapd_disk_monitoring_logging_critical_off(topo, setup, reset_logs): - """ - Verify operation with "nsslapd-disk-monitoring-logging-critical: off + """Verify operation with "nsslapd-disk-monitoring-logging-critical: off + :id: 82363bca-fe9e-11e8-9ae7-8c16451d917b :setup: Standalone :steps: @@ -210,9 +210,9 @@ def test_verify_operation_with_nsslapd_disk_monitoring_logging_critical_off(topo @disk_monitoring_ack def test_operation_with_nsslapd_disk_monitoring_logging_critical_on_below_half_of_the_threshold(topo, setup, reset_logs): - """ - Verify operation with \"nsslapd-disk-monitoring-logging-critical: on\" below 1/2 of the threshold + """Verify operation with \"nsslapd-disk-monitoring-logging-critical: on\" below 1/2 of the threshold Verify recovery + :id: 8940c502-fe9e-11e8-bcc0-8c16451d917b :setup: Standalone :steps: @@ -239,12 +239,12 @@ def test_operation_with_nsslapd_disk_monitoring_logging_critical_on_below_half_o @disk_monitoring_ack def test_setting_nsslapd_disk_monitoring_logging_critical_to_off(topo, setup, reset_logs): - """ - Setting nsslapd-disk-monitoring-logging-critical to \"off\ + """Setting nsslapd-disk-monitoring-logging-critical to "off" + :id: 93265ec4-fe9e-11e8-af93-8c16451d917b :setup: Standalone :steps: - 1. Setting nsslapd-disk-monitoring-logging-critical to \"off\ + 1. Setting nsslapd-disk-monitoring-logging-critical to "off" :expectedresults: 1. Should Success """ @@ -257,8 +257,8 @@ def test_setting_nsslapd_disk_monitoring_logging_critical_to_off(topo, setup, re @disk_monitoring_ack def test_operation_with_nsslapd_disk_monitoring_logging_critical_off(topo, setup, reset_logs): - """ - Verify operation with \"nsslapd-disk-monitoring-logging-critical: off + """Verify operation with nsslapd-disk-monitoring-logging-critical: off + :id: 97985a52-fe9e-11e8-9914-8c16451d917b :setup: Standalone :steps: @@ -325,10 +325,10 @@ def test_operation_with_nsslapd_disk_monitoring_logging_critical_off(topo, setup @disk_monitoring_ack def test_operation_with_nsslapd_disk_monitoring_logging_critical_off_below_half_of_the_threshold(topo, setup, reset_logs): - """ - Verify operation with \"nsslapd-disk-monitoring-logging-critical: off\" below 1/2 of the threshold + """Verify operation with nsslapd-disk-monitoring-logging-critical: off below 1/2 of the threshold Verify shutdown Recovery and setup + :id: 9d4c7d48-fe9e-11e8-b5d6-8c16451d917b :setup: Standalone :steps: @@ -401,9 +401,9 @@ def test_operation_with_nsslapd_disk_monitoring_logging_critical_off_below_half_ @disk_monitoring_ack def test_go_straight_below_half_of_the_threshold(topo, setup, reset_logs): - """ - Go straight below 1/2 of the threshold + """Go straight below 1/2 of the threshold Recovery and setup + :id: a2a0664c-fe9e-11e8-b220-8c16451d917b :setup: Standalone :steps: @@ -558,7 +558,7 @@ def test_below_half_of_the_threshold_not_starting_after_shutdown(topo, setup, re 1. Go straight below 1/2 of the threshold 2. Try to start the instance 3. Go back above the threshold - 2. Try to start the instance + 4. Try to start the instance :expectedresults: 1. Should Success 2. Should Fail @@ -591,8 +591,8 @@ def test_below_half_of_the_threshold_not_starting_after_shutdown(topo, setup, re @disk_monitoring_ack def test_go_straight_below_4kb(topo, setup, reset_logs): - """ - Go straight below 4KB + """Go straight below 4KB + :id: a855115a-fe9e-11e8-8e91-8c16451d917b :setup: Standalone :steps: @@ -616,8 +616,8 @@ def test_go_straight_below_4kb(topo, setup, reset_logs): @disk_monitoring_ack @pytest.mark.bz982325 def test_threshold_to_overflow_value(topo, setup, reset_logs): - """ - Overflow in nsslapd-disk-monitoring-threshold + """Overflow in nsslapd-disk-monitoring-threshold + :id: ad60ab3c-fe9e-11e8-88dc-8c16451d917b :setup: Standalone :steps: @@ -636,8 +636,8 @@ def test_threshold_to_overflow_value(topo, setup, reset_logs): @disk_monitoring_ack @pytest.mark.bz970995 def test_threshold_is_reached_to_half(topo, setup, reset_logs): - """ - RHDS not shutting down when disk monitoring threshold is reached to half. + """RHDS not shutting down when disk monitoring threshold is reached to half. + :id: b2d3665e-fe9e-11e8-b9c0-8c16451d917b :setup: Standalone :steps: Standalone @@ -677,8 +677,7 @@ def test_threshold_is_reached_to_half(topo, setup, reset_logs): ("nsslapd-disk-monitoring-grace-period", '0'), ]) def test_negagtive_parameterize(topo, setup, reset_logs, test_input, expected): - """ - Verify that invalid operations are not permitted + """Verify that invalid operations are not permitted :id: b88efbf8-fe9e-11e8-8499-8c16451d917b :parametrized: yes @@ -694,8 +693,8 @@ def test_negagtive_parameterize(topo, setup, reset_logs, test_input, expected): @disk_monitoring_ack def test_valid_operations_are_permitted(topo, setup, reset_logs): - """ - Verify that valid operations are permitted + """Verify that valid operations are permitted + :id: bd4f83f6-fe9e-11e8-88f4-8c16451d917b :setup: Standalone :steps: diff --git a/dirsrvtests/tests/suites/disk_monitoring/disk_space_test.py b/dirsrvtests/tests/suites/disk_monitoring/disk_space_test.py index 892c78e..623b5e0 100644 --- a/dirsrvtests/tests/suites/disk_monitoring/disk_space_test.py +++ b/dirsrvtests/tests/suites/disk_monitoring/disk_space_test.py @@ -5,9 +5,11 @@ # License: GPL (version 3 or any later version). # See LICENSE for details. # --- END COPYRIGHT BLOCK --- +import pytest from lib389.monitor import MonitorDiskSpace from lib389.topologies import topology_st as topo +pytestmark = pytest.mark.tier2 def test_basic(topo): """Test that the cn=disk space,cn=monitor gives at least one value diff --git a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py index 04c57df..952e2d0 100644 --- a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py +++ b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py @@ -345,6 +345,7 @@ def test_log_plugin_off(topology_st, remove_users): @pytest.mark.ds49029 def test_internal_log_server_level_0(topology_st, clean_access_logs, disable_access_log_buffering): """Tests server-initiated internal operations + :id: 798d06fe-92e8-4648-af66-21349c20638e :setup: Standalone instance :steps: @@ -390,20 +391,21 @@ def test_internal_log_server_level_0(topology_st, clean_access_logs, disable_acc @pytest.mark.ds49029 def test_internal_log_server_level_4(topology_st, clean_access_logs, disable_access_log_buffering): """Tests server-initiated internal operations + :id: a3500e47-d941-4575-b399-e3f4b49bc4b6 :setup: Standalone instance :steps: 1. Set nsslapd-plugin-logging to on 2. Configure access log level to only 4 3. Check the access logs, it should contain info about MOD operation of cn=config and other - internal operations should have the conn field set to Internal - and all values inside parenthesis set to 0. + internal operations should have the conn field set to Internal + and all values inside parenthesis set to 0. :expectedresults: 1. Operation should be successful 2. Operation should be successful 3. Access log should contain correct internal log formats with cn=config modification: - "(Internal) op=2(1)(1)" - "conn=Internal(0)" + "(Internal) op=2(1)(1)" + "conn=Internal(0)" """ topo = topology_st.standalone @@ -439,6 +441,7 @@ def test_internal_log_server_level_4(topology_st, clean_access_logs, disable_acc @pytest.mark.ds49029 def test_internal_log_level_260(topology_st, add_user_log_level_260, disable_access_log_buffering): """Tests client initiated operations when automember plugin is enabled + :id: e68a303e-c037-42b2-a5a0-fbea27c338a9 :setup: Standalone instance with internal operation logging on and nsslapd-plugin-logging to on @@ -522,6 +525,7 @@ def test_internal_log_level_260(topology_st, add_user_log_level_260, disable_acc @pytest.mark.ds49029 def test_internal_log_level_131076(topology_st, add_user_log_level_131076, disable_access_log_buffering): """Tests client-initiated operations while referential integrity plugin is enabled + :id: 44836ac9-dabd-4a8c-abd5-ecd7c2509739 :setup: Standalone instance Configure access log level to - 131072 + 4 @@ -606,6 +610,7 @@ def test_internal_log_level_131076(topology_st, add_user_log_level_131076, disab @pytest.mark.ds49029 def test_internal_log_level_516(topology_st, add_user_log_level_516, disable_access_log_buffering): """Tests client initiated operations when referential integrity plugin is enabled + :id: bee1d681-763d-4fa5-aca2-569cf93f8b71 :setup: Standalone instance Configure access log level to - 512+4 @@ -790,7 +795,7 @@ def test_etime_order_of_magnitude(topology_st, clean_access_logs, remove_users, 7. From the SRCH string get the start time and op number of the operation 8. From the op num find the associated RESULT string in the access log 9. From the RESULT string get the end time and the etime for the operation - 10. Calculate the ratio between the calculated elapsed time (end time - start time) and the logged etime + 10. Calculate the ratio between the calculated elapsed time (end time - start time) and the logged etime :expectedresults: 1. access log buffering is off 2. Previously existing access logs are deleted @@ -801,7 +806,7 @@ def test_etime_order_of_magnitude(topology_st, clean_access_logs, remove_users, 7. start time and op number are collected 8. RESULT string is catched from the access log 9. end time and etime are collected - 10. ratio between calculated elapsed time and logged etime is less or equal to 1 + 10. ratio between calculated elapsed time and logged etime is less or equal to 1 """ entry = DSLdapObject(topology_st.standalone, DEFAULT_SUFFIX) diff --git a/dirsrvtests/tests/suites/filter/basic_filter_test.py b/dirsrvtests/tests/suites/filter/basic_filter_test.py index f12581a..ec336ee 100644 --- a/dirsrvtests/tests/suites/filter/basic_filter_test.py +++ b/dirsrvtests/tests/suites/filter/basic_filter_test.py @@ -17,10 +17,10 @@ from lib389.idm.account import Accounts pytestmark = pytest.mark.tier0 def test_search_attr(topo): - """ - Test filter can search attributes + """Test filter can search attributes + :id: 9a1b0a4b-111c-4105-866d-4288f143ee07 - :setup: server + :setup: Standalone instance :steps: 1. Add test entry 2. make search diff --git a/dirsrvtests/tests/suites/filter/bitw_filter_test.py b/dirsrvtests/tests/suites/filter/bitw_filter_test.py index c844feb..73aadee 100644 --- a/dirsrvtests/tests/suites/filter/bitw_filter_test.py +++ b/dirsrvtests/tests/suites/filter/bitw_filter_test.py @@ -11,8 +11,8 @@ This script will test different type of Filers. """ import os +import ldap import pytest - from lib389.topologies import topology_st as topo from lib389._constants import PW_DM from lib389.idm.user import UserAccounts @@ -22,7 +22,7 @@ from lib389.schema import Schema from lib389.backend import Backends from lib389.idm.domain import Domain -import ldap +pytestmark = pytest.mark.tier1 FILTER_TESTPERSON = "objectclass=testperson" FILTER_TESTERPERSON = "objectclass=testerperson" @@ -163,42 +163,41 @@ def increasesizelimit(topo, size): def test_bitwise_plugin_status(topo, _create_schema): - """ - Checking bitwise plugin enabled or not, by default it should be enabled. + """Checking bitwise plugin enabled or not, by default it should be enabled. If disabled, this test case would enable the plugin + :id: 3ade097e-9ebd-11e8-b2e7-8c16451d917b :setup: Standalone :steps: - 1. Create Filter rules. - 2. Try to pass filter rules as per the condition . + 1. Create Filter rules. + 2. Try to pass filter rules as per the condition . :expectedresults: - 1. It should pass - 2. It should pass + 1. It should pass + 2. It should pass """ # Assert plugin BitwisePlugin is on assert BitwisePlugin(topo.standalone).status() def test_search_disabled_accounts(topo, _create_schema): - """ - Searching for integer Disabled Accounts. + """Searching for integer Disabled Accounts. Bitwise AND operator should match each integer, so it should return one entry. + :id: 467ef0ea-9ebd-11e8-a37f-8c16451d917b :setup: Standalone :steps: - 1. Create Filter rules. - 2. Try to pass filter rules as per the condition . + 1. Create Filter rules. + 2. Try to pass filter rules as per the condition . :expectedresults: - 1. It should pass - 2. It should pass - + 1. It should pass + 2. It should pass """ assert len(Accounts(topo.standalone, SUFFIX).filter(FILTER_CONTROL)) == 2 def test_plugin_can_be_disabled(topo, _create_schema): - """ - Verify whether plugin can be disabled + """Verify whether plugin can be disabled + :id: 4ed21588-9ebd-11e8-b862-8c16451d917b :setup: Standalone :steps: @@ -217,9 +216,9 @@ def test_plugin_can_be_disabled(topo, _create_schema): def test_plugin_is_disabled(topo, _create_schema): - """ - Testing Bitwise search when plugin is disabled + """Testing Bitwise search when plugin is disabled Bitwise search filter should give proper error message + :id: 54bebbfe-9ebd-11e8-8ca4-8c16451d917b :setup: Standalone :steps: @@ -234,8 +233,8 @@ def test_plugin_is_disabled(topo, _create_schema): def test_enabling_works_fine(topo, _create_schema): - """ - Enabling the plugin to make sure re-enabling works fine + """Enabling the plugin to make sure re-enabling works fine + :id: 5a2fc2b8-9ebd-11e8-8e18-8c16451d917b :setup: Standalone :steps: @@ -288,25 +287,25 @@ def test_enabling_works_fine(topo, _create_schema): def test_all_together(topo, _create_schema, filter_name, value): """Target_set_with_ldap_instead_of_ldap - :id: ba7f5106-9ebd-11e8-9ad6-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create Filter rules. - 2. Try to pass filter rules as per the condition . - :expectedresults: - 1. It should pass - 2. It should pass - """ + :id: ba7f5106-9ebd-11e8-9ad6-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create Filter rules. + 2. Try to pass filter rules as per the condition . + :expectedresults: + 1. It should pass + 2. It should pass + """ assert len(Accounts(topo.standalone, SUFFIX).filter(filter_name)) == value def test_5_entries(topo, _create_schema): - """ - Bitwise filter test for 5 entries + """Bitwise filter test for 5 entries By default the size limit is 2000 Inorder to perform stress tests, we need to icrease the nsslapd-sizelimit. IncrSizeLimit 52000 + :id: e939aa64-9ebd-11e8-815e-8c16451d917b :setup: Standalone :steps: @@ -326,11 +325,11 @@ def test_5_entries(topo, _create_schema): def test_5_entries1(topo, _create_schema): - """ - Bitwise filter for 5 entries + """Bitwise filter for 5 entries By default the size limit is 2000 Inorder to perform stress tests, we need to icrease the nsslapd-sizelimit. IncrSizeLimit 52000 + :id: ef8b050c-9ebd-11e8-979d-8c16451d917b :setup: Standalone :steps: @@ -350,11 +349,11 @@ def test_5_entries1(topo, _create_schema): def test_5_entries3(topo, _create_schema): - """ - Bitwise filter test for entries + """Bitwise filter test for entries By default the size limit is 2000 Inorder to perform stress tests, we need to icrease the nsslapd-sizelimit. IncrSizeLimit 52000 + :id: f5b06648-9ebd-11e8-b08f-8c16451d917b :setup: Standalone :steps: @@ -372,11 +371,11 @@ def test_5_entries3(topo, _create_schema): def test_5_entries4(topo, _create_schema): - """ - Bitwise filter for entries + """Bitwise filter for entries By default the size limit is 2000 Inorder to perform stress tests, we need to icrease the nsslapd-sizelimit. IncrSizeLimit 52000 + :id: fa5f7a4e-9ebd-11e8-ad54-8c16451d917b :setup: Standalone :steps: diff --git a/dirsrvtests/tests/suites/filter/filter_cert_test.py b/dirsrvtests/tests/suites/filter/filter_cert_test.py index af53765..d08bd35 100644 --- a/dirsrvtests/tests/suites/filter/filter_cert_test.py +++ b/dirsrvtests/tests/suites/filter/filter_cert_test.py @@ -26,6 +26,7 @@ pytestmark = pytest.mark.tier1 def test_positive(topo): """Test User certificate field + :id: e984ac40-63d1-4176-ad1e-0cbe71391b5f :setup: Standalone :steps: diff --git a/dirsrvtests/tests/suites/filter/filter_index_match_test.py b/dirsrvtests/tests/suites/filter/filter_index_match_test.py index aea0662..2f6d6cc 100644 --- a/dirsrvtests/tests/suites/filter/filter_index_match_test.py +++ b/dirsrvtests/tests/suites/filter/filter_index_match_test.py @@ -408,12 +408,13 @@ LIST_MOD_DEL_ALL = [ @pytest.fixture(scope="module") def _create_index_entry(topology_st): """Create index entries. - :id: 9c93aec8-b87d-11e9-93b0-8c16451d917b - :setup: Standalone - :steps: - 1. Test index entries can be created. - :expected results: - 1. Pass + + :id: 9c93aec8-b87d-11e9-93b0-8c16451d917b + :setup: Standalone + :steps: + 1. Test index entries can be created. + :expected results: + 1. Pass """ indexes = Indexes(topology_st.standalone) for cn_cn, index_type in LIST_CN_INDEX: @@ -427,18 +428,19 @@ def _create_index_entry(topology_st): @pytest.mark.parametrize("index", LIST_ATTR_INDEX) def test_valid_invalid_attributes(topology_st, _create_index_entry, index): """Test valid and invalid values of attributes - :id: 93dc9e02-b87d-11e9-b39b-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses that matching rule - 2. Delete existing entry - 3. Create entry with an attribute that uses that matching rule providing duplicate - values that are duplicates according to the equality matching rule. - :expected results: - 1. Pass - 2. Pass - 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) + + :id: 93dc9e02-b87d-11e9-b39b-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses that matching rule + 2. Delete existing entry + 3. Create entry with an attribute that uses that matching rule providing duplicate + values that are duplicates according to the equality matching rule. + :expected results: + 1. Pass + 2. Pass + 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) # Entry with extensibleObject @@ -453,18 +455,19 @@ def test_valid_invalid_attributes(topology_st, _create_index_entry, index): @pytest.mark.parametrize("mod", LIST_MOD_ATTR_ALL) def test_mods(topology_st, _create_index_entry, mod): """Test valid and invalid values of attributes mods - :id: 8c15874c-b87d-11e9-9c5d-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses matching mod - 2. Add an attribute that uses that matching mod providing duplicate - values that are duplicates according to the equality matching. - 3. Delete existing entry - :expected results: - 1. Pass - 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) - 3. Pass + + :id: 8c15874c-b87d-11e9-9c5d-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses matching mod + 2. Add an attribute that uses that matching mod providing duplicate + values that are duplicates according to the equality matching. + 3. Delete existing entry + :expected results: + 1. Pass + 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) + 3. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) # Entry with extensibleObject @@ -477,19 +480,20 @@ def test_mods(topology_st, _create_index_entry, mod): @pytest.mark.parametrize("mode", LIST_MOD_REPLACE_ALL) def test_mods_replace(topology_st, _create_index_entry, mode): - """Test modes replace - :id: 2dd46b7a-b928-11e9-91dd-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses matching mode - 2. Add an attribute that uses that matching mode providing duplicate - values that are duplicates according to the equality matching. - 3. Delete existing entry - :expected results: - 1. Pass - 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) - 3. Pass + """Test mods replace + + :id: 2dd46b7a-b928-11e9-91dd-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses matching mode + 2. Add an attribute that uses that matching mode providing duplicate + values that are duplicates according to the equality matching. + 3. Delete existing entry + :expected results: + 1. Pass + 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) + 3. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) # Entry with extensibleObject @@ -502,19 +506,20 @@ def test_mods_replace(topology_st, _create_index_entry, mode): @pytest.mark.parametrize("mode", LIST_MOD_DEL_ALL) def test_mods_delete(topology_st, _create_index_entry, mode): - """Test modes delete - :id: 1dda055e-b928-11e9-b5c1-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses matching mode - 2. Add an attribute that uses that matching mode providing duplicate - values that are duplicates according to the equality matching. - 3. Delete existing entry - :expected results: - 1. Pass - 2. Fail(ldap.NO_SUCH_ATTRIBUTE) - 3. Pass + """Test mods delete + + :id: 1dda055e-b928-11e9-b5c1-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses matching mode + 2. Add an attribute that uses that matching mode providing duplicate + values that are duplicates according to the equality matching. + 3. Delete existing entry + :expected results: + 1. Pass + 2. Fail(ldap.NO_SUCH_ATTRIBUTE) + 3. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) # Entry with extensibleObject @@ -769,15 +774,16 @@ FILTER_VALUES = [ def test_search_positive_negative(topology_st, _create_entries): """Filters with positive and with no output. - :id: abe3e6dd-9ecc-12e8-adf0-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1.For valid filer output should match the exact value given. - 2. For invalid filter there should not be any output. - :expected results: - 1. Pass - 2. Pass + + :id: abe3e6dd-9ecc-12e8-adf0-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1.For valid filer output should match the exact value given. + 2. For invalid filter there should not be any output. + :expected results: + 1. Pass + 2. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) for attr, value, negative_filter in FILTER_VALUES: @@ -845,13 +851,14 @@ LIST_EXT_ATTR_COUNT = [ @pytest.mark.parametrize("attr, value", LIST_EXT_ATTR_COUNT) def test_do_extensible_search(topology_st, _create_entries, attr, value): """Match filter and output. - :id: abe3e6dd-9ecc-11e8-adf0-8c16451d917c - :parametrized: yes - :setup: Standalone - :steps: - 1. Filer output should match the exact value given. - :expected results: - 1. Pass + + :id: abe3e6dd-9ecc-11e8-adf0-8c16451d917c + :parametrized: yes + :setup: Standalone + :steps: + 1. Filer output should match the exact value given. + :expected results: + 1. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) assert len(cos.filter(attr)) == value diff --git a/dirsrvtests/tests/suites/filter/filter_indexing_test.py b/dirsrvtests/tests/suites/filter/filter_indexing_test.py index bebb6c6..a9c9fad 100644 --- a/dirsrvtests/tests/suites/filter/filter_indexing_test.py +++ b/dirsrvtests/tests/suites/filter/filter_indexing_test.py @@ -101,27 +101,28 @@ def _create_entries(topo): def test_positive(topo, _create_entries, real_value): """Test positive filters - :id: 57243326-91ae-11e9-aca3-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Try to pass filter rules as per the condition . - :expected results: - 1. Pass - """ + :id: 57243326-91ae-11e9-aca3-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Try to pass filter rules as per the condition . + :expected results: + 1. Pass + """ assert Accounts(topo.standalone, DEFAULT_SUFFIX).filter(real_value) def test_indexing_schema(topo, _create_entries): """Test with schema - :id: 67a2179a-91ae-11e9-9a33-8c16451d917b - :setup: Standalone - :steps: - 1. Add attribute types to Schema. - 2. Try to pass filter rules as per the condition . - :expected results: - 1. Pass - 2. Pass + + :id: 67a2179a-91ae-11e9-9a33-8c16451d917b + :setup: Standalone + :steps: + 1. Add attribute types to Schema. + 2. Try to pass filter rules as per the condition . + :expected results: + 1. Pass + 2. Pass """ cos = CosTemplates(topo.standalone, DEFAULT_SUFFIX, rdn='ou=People') Schema(topo.standalone).add('attributetypes', @@ -136,13 +137,13 @@ def test_indexing_schema(topo, _create_entries): def test_indexing(topo, _create_entries, real_value): """Test positive index filters - :id: 7337589a-91ae-11e9-ad44-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Try to pass filter rules as per the condition . - :expected results: - 1. Pass + :id: 7337589a-91ae-11e9-ad44-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Try to pass filter rules as per the condition . + :expected results: + 1. Pass """ cos = CosTemplates(topo.standalone, DEFAULT_SUFFIX, rdn='ou=People') assert cos.filter(real_value) @@ -152,13 +153,13 @@ def test_indexing(topo, _create_entries, real_value): def test_indexing_negative(topo, _create_entries, real_value): """Test negative index filters - :id: 7e19deae-91ae-11e9-900c-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Try to pass negative filter rules as per the condition . - :expected results: - 1. Fail + :id: 7e19deae-91ae-11e9-900c-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Try to pass negative filter rules as per the condition . + :expected results: + 1. Fail """ cos = CosTemplates(topo.standalone, DEFAULT_SUFFIX, rdn='ou=People') assert not cos.filter(real_value) diff --git a/dirsrvtests/tests/suites/filter/filter_logic_test.py b/dirsrvtests/tests/suites/filter/filter_logic_test.py index d600916..58c1ebd 100644 --- a/dirsrvtests/tests/suites/filter/filter_logic_test.py +++ b/dirsrvtests/tests/suites/filter/filter_logic_test.py @@ -81,7 +81,7 @@ def test_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter '(uid=user0)' + 1. Search for test users with filter ``(uid=user0)`` :expectedresults: 1. There should be 1 user listed user0 """ @@ -95,7 +95,7 @@ def test_sub(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (uid=user*) + 1. Search for test users with filter ``(uid=user*)`` :expectedresults: 1. There should be 20 users listed from user0 to user19 """ @@ -114,7 +114,7 @@ def test_not_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (!(uid=user0) + 1. Search for test users with filter ``(!(uid=user0))`` :expectedresults: 1. There should be 19 users listed from user1 to user19 """ @@ -134,10 +134,10 @@ def test_ranges(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (uid>=user5) - 2. Search for test users with filter (uid<=user4) - 3. Search for test users with filter (uid>=ZZZZ) - 4. Search for test users with filter (uid<=aaaa) + 1. Search for test users with filter ``(uid>=user5)`` + 2. Search for test users with filter ``(uid<=user4)`` + 3. Search for test users with filter ``(uid>=ZZZZ)`` + 4. Search for test users with filter ``(uid<=aaaa)`` :expectedresults: 1. There should be 5 users listed from user5 to user9 2. There should be 15 users listed from user0 to user4 @@ -166,11 +166,11 @@ def test_and_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(uid=user0)(cn=user0)) - 2. Search for test users with filter (&(uid=user0)(cn=user1)) - 3. Search for test users with filter (&(uid=user0)(cn=user0)(sn=0)) - 4. Search for test users with filter (&(uid=user0)(cn=user1)(sn=0)) - 5. Search for test users with filter (&(uid=user0)(cn=user0)(sn=1)) + 1. Search for test users with filter ``(&(uid=user0)(cn=user0))`` + 2. Search for test users with filter ``(&(uid=user0)(cn=user1))`` + 3. Search for test users with filter ``(&(uid=user0)(cn=user0)(sn=0))`` + 4. Search for test users with filter ``(&(uid=user0)(cn=user1)(sn=0))`` + 5. Search for test users with filter ``(&(uid=user0)(cn=user0)(sn=1))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should not be any user listed @@ -192,7 +192,7 @@ def test_range(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(uid>=user5)(cn<=user7)) + 1. Search for test users with filter ``(&(uid>=user5)(cn<=user7))`` :expectedresults: 1. There should be 3 users listed i.e. user5 to user7 """ @@ -209,8 +209,8 @@ def test_and_allid_shortcut(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(objectClass=*)(uid=user0)(cn=user0)) - 2. Search for test users with filter (&(uid=user0)(cn=user0)(objectClass=*)) + 1. Search for test users with filter ``(&(objectClass=*)(uid=user0)(cn=user0))`` + 2. Search for test users with filter ``(&(uid=user0)(cn=user0)(objectClass=*))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be 1 user listed i.e. user0 @@ -226,11 +226,11 @@ def test_or_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (|(uid=user0)(cn=user0)) - 2. Search for test users with filter (|(uid=user0)(uid=user1)) - 3. Search for test users with filter (|(uid=user0)(cn=user0)(sn=0)) - 4. Search for test users with filter (|(uid=user0)(uid=user1)(sn=0)) - 5. Search for test users with filter (|(uid=user0)(uid=user1)(uid=user2)) + 1. Search for test users with filter ``|(uid=user0)(cn=user0)`` + 2. Search for test users with filter ``(|(uid=user0)(uid=user1))`` + 3. Search for test users with filter ``(|(uid=user0)(cn=user0)(sn=0))`` + 4. Search for test users with filter ``(|(uid=user0)(uid=user1)(sn=0))`` + 5. Search for test users with filter ``(|(uid=user0)(uid=user1)(uid=user2))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be 2 users listed i.e. user0 and user1 @@ -252,8 +252,8 @@ def test_and_not_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(uid=user0)(!(cn=user0))) - 2. Search for test users with filter (&(uid=*)(!(uid=user0))) + 1. Search for test users with filter ``(&(uid=user0)(!(cn=user0)))`` + 2. Search for test users with filter ``(&(uid=*)(!(uid=user0)))`` :expectedresults: 1. There should be no users listed 2. There should be 19 users listed i.e. user1 to user19 @@ -274,7 +274,7 @@ def test_or_not_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (|(!(uid=user0))(!(uid=user1))) + 1. Search for test users with filter ``(|(!(uid=user0))(!(uid=user1)))`` :expectedresults: 1. There should be 20 users listed i.e. user0 to user19 """ @@ -293,13 +293,13 @@ def test_and_range(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(uid>=user5)(uid=user6)) - 2. Search for test users with filter (&(uid>=user5)(uid=user0)) - 3. Search for test users with filter (&(uid>=user5)(uid=user6)(sn=6)) - 4. Search for test users with filter (&(uid>=user5)(uid=user0)(sn=0)) - 5. Search for test users with filter (&(uid>=user5)(uid=user0)(sn=1)) - 6. Search for test users with filter (&(uid>=user5)(uid>=user6)) - 7. Search for test users with filter (&(uid>=user5)(uid>=user6)(uid>=user7)) + 1. Search for test users with filter ``(&(uid>=user5)(uid=user6))`` + 2. Search for test users with filter ``(&(uid>=user5)(uid=user0))`` + 3. Search for test users with filter ``(&(uid>=user5)(uid=user6)(sn=6))`` + 4. Search for test users with filter ``(&(uid>=user5)(uid=user0)(sn=0))`` + 5. Search for test users with filter ``(&(uid>=user5)(uid=user0)(sn=1))`` + 6. Search for test users with filter ``(&(uid>=user5)(uid>=user6))`` + 7. Search for test users with filter ``(&(uid>=user5)(uid>=user6)(uid>=user7))`` :expectedresults: 1. There should be 1 user listed i.e. user6 2. There should be no users listed @@ -332,8 +332,8 @@ def test_or_range(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (|(uid>=user5)(uid=user6)) - 2. Search for test users with filter (|(uid>=user5)(uid=user0)) + 1. Search for test users with filter ``(|(uid>=user5)(uid=user6))`` + 2. Search for test users with filter ``(|(uid>=user5)(uid=user0))`` :expectedresults: 1. There should be 5 users listed i.e. user5 to user9 2. There should be 6 users listed i.e. user5 to user9 and user0 @@ -354,10 +354,10 @@ def test_and_and_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(&(uid=user0)(sn=0))(cn=user0)) - 2. Search for test users with filter (&(&(uid=user1)(sn=0))(cn=user0)) - 3. Search for test users with filter (&(&(uid=user0)(sn=1))(cn=user0)) - 4. Search for test users with filter (&(&(uid=user0)(sn=0))(cn=user1)) + 1. Search for test users with filter ``(&(&(uid=user0)(sn=0))(cn=user0))`` + 2. Search for test users with filter ``(&(&(uid=user1)(sn=0))(cn=user0))`` + 3. Search for test users with filter ``(&(&(uid=user0)(sn=1))(cn=user0))`` + 4. Search for test users with filter ``(&(&(uid=user0)(sn=0))(cn=user1))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be no users listed @@ -377,11 +377,11 @@ def test_or_or_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (|(|(uid=user0)(sn=0))(cn=user0)) - 2. Search for test users with filter (|(|(uid=user1)(sn=0))(cn=user0)) - 3. Search for test users with filter (|(|(uid=user0)(sn=1))(cn=user0)) - 4. Search for test users with filter (|(|(uid=user0)(sn=0))(cn=user1)) - 5. Search for test users with filter (|(|(uid=user0)(sn=1))(cn=user2)) + 1. Search for test users with filter ``(|(|(uid=user0)(sn=0))(cn=user0))`` + 2. Search for test users with filter ``(|(|(uid=user1)(sn=0))(cn=user0))`` + 3. Search for test users with filter ``(|(|(uid=user0)(sn=1))(cn=user0))`` + 4. Search for test users with filter ``(|(|(uid=user0)(sn=0))(cn=user1))`` + 5. Search for test users with filter ``(|(|(uid=user0)(sn=1))(cn=user2))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be 2 users listed i.e. user0, user1 @@ -403,11 +403,11 @@ def test_and_or_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (&(|(uid=user0)(sn=0))(cn=user0)) - 2. Search for test users with filter (&(|(uid=user1)(sn=0))(cn=user0)) - 3. Search for test users with filter (&(|(uid=user0)(sn=1))(cn=user0)) - 4. Search for test users with filter (&(|(uid=user0)(sn=0))(cn=user1)) - 5. Search for test users with filter (&(|(uid=user0)(sn=1))(cn=*)) + 1. Search for test users with filter ``(&(|(uid=user0)(sn=0))(cn=user0))`` + 2. Search for test users with filter ``(&(|(uid=user1)(sn=0))(cn=user0))`` + 3. Search for test users with filter ``(&(|(uid=user0)(sn=1))(cn=user0))`` + 4. Search for test users with filter ``(&(|(uid=user0)(sn=0))(cn=user1))`` + 5. Search for test users with filter ``(&(|(uid=user0)(sn=1))(cn=*))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be 1 user listed i.e. user0 @@ -429,10 +429,10 @@ def test_or_and_eq(topology_st_f): :setup: Standalone instance with 20 test users added from uid=user0 to uid=user20 :steps: - 1. Search for test users with filter (|(&(uid=user0)(sn=0))(uid=user0)) - 2. Search for test users with filter (|(&(uid=user1)(sn=2))(uid=user0)) - 3. Search for test users with filter (|(&(uid=user0)(sn=1))(uid=user0)) - 4. Search for test users with filter (|(&(uid=user1)(sn=1))(uid=user0)) + 1. Search for test users with filter ``(|(&(uid=user0)(sn=0))(uid=user0))`` + 2. Search for test users with filter ``(|(&(uid=user1)(sn=2))(uid=user0))`` + 3. Search for test users with filter ``(|(&(uid=user0)(sn=1))(uid=user0))`` + 4. Search for test users with filter ``(|(&(uid=user1)(sn=1))(uid=user0))`` :expectedresults: 1. There should be 1 user listed i.e. user0 2. There should be 1 user listed i.e. user0 diff --git a/dirsrvtests/tests/suites/filter/filter_match_test.py b/dirsrvtests/tests/suites/filter/filter_match_test.py index 6339a99..1846778 100644 --- a/dirsrvtests/tests/suites/filter/filter_match_test.py +++ b/dirsrvtests/tests/suites/filter/filter_match_test.py @@ -601,14 +601,15 @@ LIST_EXT = [("(attrbitStringMatch:bitStringMatch:='0001'B)", 1), def test_matching_rules(topology_st): """Test matching rules. - :id: 8cb6e62a-8cfc-11e9-be9a-8c16451d917b - :setup: Standalone - :steps: - 1. Search for matching rule. - 2. Matching rule should be there in schema. - :expected results: - 1. Pass - 2. Pass + + :id: 8cb6e62a-8cfc-11e9-be9a-8c16451d917b + :setup: Standalone + :steps: + 1. Search for matching rule. + 2. Matching rule should be there in schema. + :expected results: + 1. Pass + 2. Pass """ matchingrules = Schema(topology_st.standalone).get_matchingrules() assert matchingrules @@ -620,12 +621,13 @@ def test_matching_rules(topology_st): def test_add_attribute_types(topology_st): """Test add attribute types to schema - :id: 84d6dece-8cfc-11e9-89a3-8c16451d917b - :setup: Standalone - :steps: - 1. Add new attribute types to schema. - :expected results: - 1. Pass + + :id: 84d6dece-8cfc-11e9-89a3-8c16451d917b + :setup: Standalone + :steps: + 1. Add new attribute types to schema. + :expected results: + 1. Pass """ for attribute in ATTR: Schema(topology_st.standalone).add('attributetypes', attribute) @@ -635,18 +637,18 @@ def test_add_attribute_types(topology_st): def test_valid_invalid_attributes(topology_st, rule): """Delete duplicate attributes - :id: d0bf3942-ba71-4947-90c8-1bfa9f0b838f - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses that matching rule - 2. Delete existing entry - 3. Create entry with an attribute that uses that matching rule providing duplicate - values that are duplicates according to the equality matching rule. - :expected results: - 1. Pass - 2. Pass - 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) + :id: d0bf3942-ba71-4947-90c8-1bfa9f0b838f + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses that matching rule + 2. Delete existing entry + 3. Create entry with an attribute that uses that matching rule providing duplicate + values that are duplicates according to the equality matching rule. + :expected results: + 1. Pass + 2. Pass + 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) """ # Entry with extensibleObject cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) @@ -662,18 +664,18 @@ def test_valid_invalid_attributes(topology_st, rule): def test_valid_invalid_modes(topology_st, mode): """Add duplicate attributes - :id: dec03362-ba26-41da-b479-e2b788403fce - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses matching mode - 2. Add an attribute that uses that matching mode providing duplicate - values that are duplicates according to the equality matching. - 3. Delete existing entry - :expected results: - 1. Pass - 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) - 3. Pass + :id: dec03362-ba26-41da-b479-e2b788403fce + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses matching mode + 2. Add an attribute that uses that matching mode providing duplicate + values that are duplicates according to the equality matching. + 3. Delete existing entry + :expected results: + 1. Pass + 2. Fail(ldap.TYPE_OR_VALUE_EXISTS) + 3. Pass """ # Entry with extensibleObject cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) @@ -688,24 +690,24 @@ def test_valid_invalid_modes(topology_st, mode): def test_valid_invalid_mode_replace(topology_st, mode): """Replace and Delete duplicate attribute - :id: 7ec19eca-8cfc-11e9-a0df-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Create entry with an attribute that uses that matching rule - 2. Replace an attribute that uses that matching rule - 3. Replace an attribute that uses that matching rule providing duplicate - values that are duplicates according to the equality matching mode. - 4. Delete existing attribute - 5. Try to delete the deleted attribute again. - 6. Delete entry - :expected results: - 1. Pass - 2. Pass - 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) - 4. Pass - 5. Fail(ldap.NO_SUCH_ATTRIBUTE) - 6. Pass + :id: 7ec19eca-8cfc-11e9-a0df-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Create entry with an attribute that uses that matching rule + 2. Replace an attribute that uses that matching rule + 3. Replace an attribute that uses that matching rule providing duplicate + values that are duplicates according to the equality matching mode. + 4. Delete existing attribute + 5. Try to delete the deleted attribute again. + 6. Delete entry + :expected results: + 1. Pass + 2. Pass + 3. Fail(ldap.TYPE_OR_VALUE_EXISTS) + 4. Pass + 5. Fail(ldap.NO_SUCH_ATTRIBUTE) + 6. Pass """ # Entry with extensibleObject cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) @@ -740,16 +742,16 @@ def test_match_count(topology_st, _searches, attr, po_value, ne_attr): """Search for an attribute with that matching rule with an assertion value that should match - :id: 00276180-b902-11e9-bff2-8c16451d917b - :parametrized: yes - :setup: Standalone - :steps: - 1. Filter rules as per the condition and assert the no of output. - 2. Negative filter with no outputs. - :expected results: - 1. Pass - 2. Pass - """ + :id: 00276180-b902-11e9-bff2-8c16451d917b + :parametrized: yes + :setup: Standalone + :steps: + 1. Filter rules as per the condition and assert the no of output. + 2. Negative filter with no outputs. + :expected results: + 1. Pass + 2. Pass + """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) assert len(cos.filter(attr)) == po_value assert not cos.filter(ne_attr) @@ -759,13 +761,13 @@ def test_match_count(topology_st, _searches, attr, po_value, ne_attr): def test_extensible_search(topology_st, _searches, attr, value): """Match filter and output. - :id: abe3e6dd-9ecc-11e8-adf0-8c16451d917c - :parametrized: yes - :setup: Standalone - :steps: - 1. Filer output should match the exact value given. - :expected results: - 1. Pass + :id: abe3e6dd-9ecc-11e8-adf0-8c16451d917c + :parametrized: yes + :setup: Standalone + :steps: + 1. Filer output should match the exact value given. + :expected results: + 1. Pass """ cos = CosTemplates(topology_st.standalone, DEFAULT_SUFFIX) assert len(cos.filter(attr)) == value diff --git a/dirsrvtests/tests/suites/filter/filter_test.py b/dirsrvtests/tests/suites/filter/filter_test.py index bb3febe..fa7a4cd 100644 --- a/dirsrvtests/tests/suites/filter/filter_test.py +++ b/dirsrvtests/tests/suites/filter/filter_test.py @@ -249,7 +249,6 @@ def test_extended_search(topology_st): 6. This should return one entry 7. This should return NO entry 8. This should return one entry - 3. return one entry """ log.info('Running test_filter_escaped...') diff --git a/dirsrvtests/tests/suites/filter/filterscanlimit_test.py b/dirsrvtests/tests/suites/filter/filterscanlimit_test.py index 29eec82..a1555b8 100644 --- a/dirsrvtests/tests/suites/filter/filterscanlimit_test.py +++ b/dirsrvtests/tests/suites/filter/filterscanlimit_test.py @@ -168,10 +168,10 @@ LIST_OF_USER_PEOPLE = [ @pytest.mark.xfail(ds_is_older('1.4.4'), reason="https://pagure.io/389-ds-base/issue/50201") def test_invalid_configuration(topo): - """" - Error handling for invalid configuration + """"Error handling for invalid configuration Starting...test cases for bug1011539 Index config error handling does not exist - you can add any old thing + :id: 377950f6-9f06-11e8-831b-8c16451d917b :setup: Standalone instance :steps: @@ -202,8 +202,8 @@ def test_invalid_configuration(topo): def test_idlistscanlimit(topo): - """ - Test various combinations of filters and idlistscanlimit + """Test various combinations of filters and idlistscanlimit + :id: 44f83e2c-9f06-11e8-bffe-8c16451d917b :setup: Standalone instance :steps: diff --git a/dirsrvtests/tests/suites/filter/schema_validation_test.py b/dirsrvtests/tests/suites/filter/schema_validation_test.py index d0d67ca..60e9c50 100644 --- a/dirsrvtests/tests/suites/filter/schema_validation_test.py +++ b/dirsrvtests/tests/suites/filter/schema_validation_test.py @@ -15,6 +15,8 @@ from lib389._mapped_object import DSLdapObjects from lib389._constants import DEFAULT_SUFFIX from lib389.extensibleobject import UnsafeExtensibleObjects +pytestmark = pytest.mark.tier1 + def _check_value(inst_cfg, value, exvalue=None): if exvalue is None: exvalue = value diff --git a/dirsrvtests/tests/suites/fourwaymmr/fourwaymmr_test.py b/dirsrvtests/tests/suites/fourwaymmr/fourwaymmr_test.py index e65bec1..ee0a83d 100644 --- a/dirsrvtests/tests/suites/fourwaymmr/fourwaymmr_test.py +++ b/dirsrvtests/tests/suites/fourwaymmr/fourwaymmr_test.py @@ -31,8 +31,8 @@ def _cleanupentris(request, topo_m4): def test_verify_trees(topo_m4): - """ - All 4 masters should have consistent data + """All 4 masters should have consistent data + :id: 01733ef8-e764-11e8-98f3-8c16451d917b :setup: 4 Instances with replication :steps: @@ -54,8 +54,8 @@ def test_verify_trees(topo_m4): def test_sync_through_to_all_4_masters(topo_m4, _cleanupentris): - """ - Insert fresh data into Master 2 - about 10 entries + """Insert fresh data into Master 2 - about 10 entries + :id: 10917e04-e764-11e8-8367-8c16451d917b :setup: 4 Instances with replication :steps: @@ -81,8 +81,8 @@ def test_sync_through_to_all_4_masters(topo_m4, _cleanupentris): def test_modify_some_data_in_m3(topo_m4): - """ - Modify some data in Master 3 , check trees on all 4 masters + """Modify some data in Master 3 , check trees on all 4 masters + :id: 33583ff4-e764-11e8-8491-8c16451d917b :setup: 4 Instances with replication :steps: @@ -113,8 +113,8 @@ def test_modify_some_data_in_m3(topo_m4): def test_delete_a_few_entries_in_m4(topo_m4, _cleanupentris): - """ - Delete a few entries in Master 4 , verify trees. + """Delete a few entries in Master 4 , verify trees. + :id: 6ea94d78-e764-11e8-987f-8c16451d917b :setup: 4 Instances with replication :steps: @@ -146,8 +146,8 @@ def test_delete_a_few_entries_in_m4(topo_m4, _cleanupentris): def test_replicated_multivalued_entries(topo_m4): - """ - Replicated multivalued entries are ordered the same way on all consumers + """Replicated multivalued entries are ordered the same way on all consumers + :id: 7bf9a34c-e764-11e8-928c-8c16451d917b :setup: 4 Instances with replication :steps: @@ -186,8 +186,8 @@ def test_replicated_multivalued_entries(topo_m4): @pytest.mark.bz157377 def test_bad_replication_agreement(topo_m4): - """ - Create the bad replication agreement and try to add it + """Create the bad replication agreement and try to add it + :id: 9cf3daf4-e764-11e8-a132-8c16451d917b :setup: 4 Instances with replication :steps: @@ -251,8 +251,8 @@ def test_bad_replication_agreement(topo_m4): @pytest.mark.bz834074 def test_nsds5replicaenabled_verify(topo_m4): - """ - Add the attribute nsds5ReplicaEnabled to cn=config + """Add the attribute nsds5ReplicaEnabled to cn=config + :id: ba6dd634-e764-11e8-b158-8c16451d917b :setup: 4 Instances with replication :steps: @@ -363,8 +363,8 @@ def test_nsds5replicaenabled_verify(topo_m4): @pytest.mark.bz830344 def test_create_an_entry_on_the_supplier(topo_m4): - """ - Shut down one instance and create an entry on the supplier + """Shut down one instance and create an entry on the supplier + :id: f57538d0-e764-11e8-94fc-8c16451d917b :setup: standalone :steps: @@ -386,8 +386,8 @@ def test_create_an_entry_on_the_supplier(topo_m4): @pytest.mark.bz923502 def test_bob_acceptance_tests(topo_m4): - """ - Run multiple modrdn_s operation on master1 + """Run multiple modrdn_s operation on master1 + :id: 26eb87f2-e765-11e8-9698-8c16451d917b :setup: standalone :steps: @@ -418,8 +418,8 @@ def test_bob_acceptance_tests(topo_m4): @pytest.mark.bz830335 def test_replica_backup_and_restore(topo_m4): - """ - Test Backup and restore + """Test Backup and restore + :id: 5ad1b85c-e765-11e8-9668-8c16451d917b :setup: standalone :steps: diff --git a/dirsrvtests/tests/suites/fractional/fractional_test.py b/dirsrvtests/tests/suites/fractional/fractional_test.py index 0d118e9..2314fdd 100644 --- a/dirsrvtests/tests/suites/fractional/fractional_test.py +++ b/dirsrvtests/tests/suites/fractional/fractional_test.py @@ -100,7 +100,7 @@ def test_fractional_agreements(_create_entries): 1. Add test entry 2. Search for an entry with disallowed attributes on every server. 3. The attributes should be present on the two suppliers with traditional replication - agreements + agreements 4. Should be missing on both consumers with fractional agreements. :expected results: 1. Success @@ -159,7 +159,7 @@ def test_read_write_supplier(_create_entries): 2. First attempt to modify an attribute that should be visible (mail) 3. Then attempt to modify one that should not be visible (roomnumber) 4. The change to mail should appear on all servers; the change to - room number should only appear on the suppliers INST[0] and INST[1]. + room number should only appear on the suppliers INST[0] and INST[1]. :expected results: 1. Success 2. Success @@ -199,10 +199,10 @@ def test_filtered_attributes(_create_entries): :steps: 1. Add a new entry to MASTER1. 2. Confirm that it is replicated in entirety - to MASTER2, but that filtered attributes are not replicated to - CONSUMER1 or CONSUMER2. + to MASTER2, but that filtered attributes are not replicated to + CONSUMER1 or CONSUMER2. 3. The entry should be present in all servers. Filtered attributes should not - be available from the consumers with fractional replication agreements. + be available from the consumers with fractional replication agreements. :expected results: 1. Success 2. Success @@ -242,7 +242,7 @@ def test_fewer_changes_in_single_operation(_create_entries): :steps: 1. Add a new entry to MASTER1. 2. Fewer changes (but more than one) in a single operation to fractionally - replicated attributes than the number of fractionally replicated attributes. + replicated attributes than the number of fractionally replicated attributes. 3. All servers are still alive. :expected results: 1. Success @@ -302,7 +302,7 @@ def test_newly_added_attribute_nsds5replicatedattributelisttotal(_create_entries 1. Enabling memberOf plugin and then adding few groups with member attributes. 2. No memberOf plugin enabled on read only replicas 3. The attributes mentioned in the nsds5replicatedattributelist - excluded from incremental updates. + excluded from incremental updates. :expected results: 1. Success 2. Success @@ -330,7 +330,7 @@ def test_attribute_nsds5replicatedattributelisttotal(_create_entries, _add_user_ 1. Add a new entry to MASTER1. 2. Enabling memberOf plugin and then adding few groups with member attributes. 3. No memberOf plugin enabled in other consumers,ie., the read only replicas - won't get incremental updates for the attributes mentioned in the list. + won't get incremental updates for the attributes mentioned in the list. 4. Run total update and verify the same attributes added/modified in the read-only replicas. :expected results: 1. Success diff --git a/dirsrvtests/tests/suites/healthcheck/health_config_test.py b/dirsrvtests/tests/suites/healthcheck/health_config_test.py index 96882af..8b8878b 100644 --- a/dirsrvtests/tests/suites/healthcheck/health_config_test.py +++ b/dirsrvtests/tests/suites/healthcheck/health_config_test.py @@ -81,10 +81,10 @@ def test_healthcheck_logging_format_should_be_revised(topology_st): :setup: Standalone instance :steps: 1. Create DS instance - 2. Set nsslapd-logging-hr-timestamps-enabled to ‘off’ + 2. Set nsslapd-logging-hr-timestamps-enabled to 'off' 3. Use HealthCheck without --json option 4. Use HealthCheck with --json option - 5. Set nsslapd-logging-hr-timestamps-enabled to ‘on’ + 5. Set nsslapd-logging-hr-timestamps-enabled to 'on' 6. Use HealthCheck without --json option 7. Use HealthCheck with --json option :expectedresults: @@ -294,8 +294,8 @@ def test_healthcheck_low_disk_space(topology_st): 1. Success 2. Success 3. Success - 3. Healthcheck reports DSDSLE0001 code and related details 4. Healthcheck reports DSDSLE0001 code and related details + 5. Healthcheck reports DSDSLE0001 code and related details """ RET_CODE = 'DSDSLE0001' diff --git a/dirsrvtests/tests/suites/healthcheck/healthcheck_test.py b/dirsrvtests/tests/suites/healthcheck/healthcheck_test.py index 8cdd6ea..dfd21ac 100644 --- a/dirsrvtests/tests/suites/healthcheck/healthcheck_test.py +++ b/dirsrvtests/tests/suites/healthcheck/healthcheck_test.py @@ -139,7 +139,7 @@ def test_healthcheck_replication(topology_m2): 1. Create a two masters replication topology 2. Set nsslapd-changelogmaxage to 30d 3. Use HealthCheck without --json option - 3. Use HealthCheck with --json option + 4. Use HealthCheck with --json option :expectedresults: 1. Success 2. Success diff --git a/dirsrvtests/tests/suites/indexes/regression_test.py b/dirsrvtests/tests/suites/indexes/regression_test.py index 1a71f16..96d0a45 100644 --- a/dirsrvtests/tests/suites/indexes/regression_test.py +++ b/dirsrvtests/tests/suites/indexes/regression_test.py @@ -15,10 +15,12 @@ from lib389.index import Indexes from lib389.backend import Backends from lib389.idm.user import UserAccounts from lib389.topologies import topology_st as topo +from lib389.utils import ds_is_older pytestmark = pytest.mark.tier1 +@pytest.mark.skipif(ds_is_older("1.4.4.4"), reason="Not implemented") def test_reindex_task_creates_abandoned_index_file(topo): """ Recreating an index for the same attribute but changing @@ -42,12 +44,12 @@ def test_reindex_task_creates_abandoned_index_file(topo): 11. Check that an ldapsearch returns the results (mozillaCustom1=xyz) 12. Restart the instance 13. Notice that an ldapsearch does not return a result(mozillacustom1=xyz) - 15. Check that an ldapsearch does not return a result (mozillacustom1=xyz) - 16. Check that an ldapsearch returns the results (mozillaCustom1=xyz) - 17. Reindex the backend - 18. Notice the second indexfile for this attribute - 19. Check the content of the index (after it has been flushed to disk) no mozillacustom1.db - 20. Check the content of the index (after it has been flushed to disk) mozillaCustom1.db + 14. Check that an ldapsearch does not return a result (mozillacustom1=xyz) + 15. Check that an ldapsearch returns the results (mozillaCustom1=xyz) + 16. Reindex the backend + 17. Notice the second indexfile for this attribute + 18. Check the content of the index (after it has been flushed to disk) no mozillacustom1.db + 19. Check the content of the index (after it has been flushed to disk) mozillaCustom1.db :expectedresults: 1. Should Success. 2. Should Success. @@ -68,7 +70,6 @@ def test_reindex_task_creates_abandoned_index_file(topo): 17. Should Success. 18. Should Success. 19. Should Success. - 20. Should Success. """ inst = topo.standalone diff --git a/dirsrvtests/tests/suites/logging/logging_config_test.py b/dirsrvtests/tests/suites/logging/logging_config_test.py index ac154b7..3f3d7a7 100644 --- a/dirsrvtests/tests/suites/logging/logging_config_test.py +++ b/dirsrvtests/tests/suites/logging/logging_config_test.py @@ -14,6 +14,7 @@ log = logging.getLogger(__name__) big_value = "1111111111111111111111111111111111111111111" +pytestmark = pytest.mark.tier1 @pytest.mark.parametrize("attr, invalid_vals, valid_vals", [ diff --git a/dirsrvtests/tests/suites/mapping_tree/be_del_and_default_naming_attr_test.py b/dirsrvtests/tests/suites/mapping_tree/be_del_and_default_naming_attr_test.py index 34a2de2..c25d89c 100644 --- a/dirsrvtests/tests/suites/mapping_tree/be_del_and_default_naming_attr_test.py +++ b/dirsrvtests/tests/suites/mapping_tree/be_del_and_default_naming_attr_test.py @@ -6,6 +6,8 @@ from lib389.topologies import topology_m1 as topo from lib389.backend import Backends from lib389.encrypted_attributes import EncryptedAttrs +pytestmark = pytest.mark.tier1 + DEBUGGING = os.getenv("DEBUGGING", default=False) if DEBUGGING: logging.getLogger(__name__).setLevel(logging.DEBUG) @@ -26,13 +28,13 @@ def test_be_delete(topo): :steps: 1. Create second backend/suffix 2. Add an encrypted attribute to the default suffix - 2. Delete default suffix - 3. Check the nsslapd-defaultnamingcontext is updated - 4. Delete the last backend - 5. Check the namingcontext has not changed - 6. Add new backend - 7. Set default naming context - 8. Verify the naming context is correct + 3. Delete default suffix + 4. Check the nsslapd-defaultnamingcontext is updated + 5. Delete the last backend + 6. Check the namingcontext has not changed + 7. Add new backend + 8. Set default naming context + 9. Verify the naming context is correct :expectedresults: 1. Success 2. Success @@ -42,6 +44,7 @@ def test_be_delete(topo): 6. Success 7. Success 8. Success + 9. Success """ inst = topo.ms["master1"] diff --git a/dirsrvtests/tests/suites/memberof_plugin/regression_test.py b/dirsrvtests/tests/suites/memberof_plugin/regression_test.py index ca74791..8f65596 100644 --- a/dirsrvtests/tests/suites/memberof_plugin/regression_test.py +++ b/dirsrvtests/tests/suites/memberof_plugin/regression_test.py @@ -713,7 +713,7 @@ def test_silent_memberof_failure(topology_st): 10. should succeed 11. should fail OPERATION_ERROR because memberof plugin fails to add 'memberof' to members. 12. should succeed - 14. should fail OPERATION_ERROR because memberof plugin fails to add 'memberof' to members + 13. should fail OPERATION_ERROR because memberof plugin fails to add 'memberof' to members 14. should succeed """ # only scopes peoplebase diff --git a/dirsrvtests/tests/suites/paged_results/paged_results_test.py b/dirsrvtests/tests/suites/paged_results/paged_results_test.py index 9fdceb1..ba7325d 100644 --- a/dirsrvtests/tests/suites/paged_results/paged_results_test.py +++ b/dirsrvtests/tests/suites/paged_results/paged_results_test.py @@ -509,7 +509,8 @@ def test_search_with_timelimit(topology_st, create_user): @pytest.mark.parametrize('aci_subject', ('dns = "{}"'.format(HOSTNAME), - 'ip = "{}"'.format(IP_ADDRESS))) + 'ip = "{}"'.format(IP_ADDRESS)), + ids=['fqdn','ip']) def test_search_dns_ip_aci(topology_st, create_user, aci_subject): """Verify that after performing multiple simple paged searches to completion on the suffix with DNS or IP based ACI diff --git a/dirsrvtests/tests/suites/password/password_policy_test.py b/dirsrvtests/tests/suites/password/password_policy_test.py index 42910d7..cc1d74c 100644 --- a/dirsrvtests/tests/suites/password/password_policy_test.py +++ b/dirsrvtests/tests/suites/password/password_policy_test.py @@ -155,7 +155,7 @@ def _fixture_for_password_change(request, topo): def test_password_change_section(topo, _policy_setup, _fixture_for_password_change): - """ Password Change Section. + """Password Change Section. :id: 5d018c08-9388-11ea-8394-8c16451d917b :setup: Standalone @@ -405,7 +405,7 @@ def _fixture_for_syntax_section(request, topo): def test_password_syntax_section(topo, _policy_setup, _fixture_for_syntax_section): - """ Password Syntax Section. + """Password Syntax Section. :id: 7bf1cb46-9388-11ea-9019-8c16451d917b :setup: Standalone @@ -418,8 +418,8 @@ def test_password_syntax_section(topo, _policy_setup, _fixture_for_syntax_sectio 6. Try to change password to givenname which is trivial. Should get error 7. Try to change password to sn which is trivial. Should get error 8. Changing password minimum length back to 6 - 9. Changing current password from *1 to *2 - 10. Changing current password from *2 to *1 + 9. Changing current password from ``*1`` to ``*2`` + 10. Changing current password from ``*2`` to ``*1`` 11. Changing current password to the evil password 12. Resetting to original password as cn=directory manager 13. Setting policy to NOT Check Password Syntax @@ -664,7 +664,7 @@ def _fixture_for_password_history(request, topo): def test_password_history_section(topo, _policy_setup, _fixture_for_password_history): - """ Password History Section. + """Password History Section. :id: 51f459a0-a0ba-11ea-ade7-8c16451d917b :setup: Standalone @@ -682,8 +682,8 @@ def test_password_history_section(topo, _policy_setup, _fixture_for_password_his 11. Add a password test for long long password (more than 490 bytes). 12. Changing password : LONGPASSWORD goes in history 13. Setting policy to NOT keep password histories - 14. Changing current password from *2 to *2 - 15. Try to change *2 to *1, should succeed + 14. Changing current password from ``*2 to ``*2`` + 15. Try to change ``*2`` to ``*1``, should succeed :expected results: 1. Success 2. Success @@ -862,13 +862,13 @@ def _fixture_for_password_min_age(request, topo): def test_password_minimum_age_section(topo, _policy_setup, _fixture_for_password_min_age): - """ Password History Section. + """Password History Section. :id: 470f5b2a-a0ba-11ea-ab2d-8c16451d917b :setup: Standalone :steps: 1. Searching for password minimum age, should be 0 per defaults set - 2. Change current password from *1 to *2 + 2. Change current password from ``*1`` to ``*2`` 3. Wait 5 secs and try to change again. Should fail. 4. Wait more time to complete password min age 5. Now user can change password @@ -939,7 +939,7 @@ def _fixture_for_password_lock_out(request, topo): def test_account_lockout_and_lockout_duration_section(topo, _policy_setup, _fixture_for_password_lock_out): - """ Account Lockout and Lockout Duration Section + """Account Lockout and Lockout Duration Section :id: 1ff0b7a4-b560-11ea-9ece-8c16451d917b :setup: Standalone @@ -1061,7 +1061,7 @@ def _bind_self(topo, user_password_new_pass_list): def test_grace_limit_section(topo, _policy_setup, _fixture_for_grace_limit): - """ Account Lockout and Lockout Duration Section + """Account Lockout and Lockout Duration Section :id: 288e3756-b560-11ea-9390-8c16451d917b :setup: Standalone @@ -1278,7 +1278,7 @@ def _fixture_for_additional_cases(topo): def test_additional_corner_cases(topo, _policy_setup, _fixture_for_additional_cases): - """ Additional corner cases + """Additional corner cases :id: 2f6cec66-b560-11ea-9d7c-8c16451d917b :setup: Standalone @@ -1367,4 +1367,4 @@ def test_additional_corner_cases(topo, _policy_setup, _fixture_for_additional_ca if __name__ == "__main__": CURRENT_FILE = os.path.realpath(__file__) - pytest.main("-s -v %s" % CURRENT_FILE) \ No newline at end of file + pytest.main("-s -v %s" % CURRENT_FILE) diff --git a/dirsrvtests/tests/suites/password/pwdAdmin_test.py b/dirsrvtests/tests/suites/password/pwdAdmin_test.py index 16869d4..e5552f5 100644 --- a/dirsrvtests/tests/suites/password/pwdAdmin_test.py +++ b/dirsrvtests/tests/suites/password/pwdAdmin_test.py @@ -147,13 +147,13 @@ def test_pwdAdmin_bypass(topology_st, password_policy): :id: 743bfe33-a1f7-482b-8807-efeb7aa57348 :setup: Standalone instance, Password Admin entry, Password policy configured as below: - nsslapd-pwpolicy-local: on - passwordCheckSyntax: on - passwordMinCategories: 1 - passwordMinTokenLength: 2 - passwordExp: on - passwordMinDigits: 1 - passwordMinSpecials: 1 + nsslapd-pwpolicy-local: on + passwordCheckSyntax: on + passwordMinCategories: 1 + passwordMinTokenLength: 2 + passwordExp: on + passwordMinDigits: 1 + passwordMinSpecials: 1 :steps: 1: Add users with invalid passwords :expectedresults: @@ -204,13 +204,13 @@ def test_pwdAdmin_no_admin(topology_st, password_policy): :id: 74347798-7cc7-4ce7-ad5c-06387ffde02c :setup: Standalone instance, Password Admin entry, Password policy configured as below: - nsslapd-pwpolicy-local: on - passwordCheckSyntax: on - passwordMinCategories: 1 - passwordMinTokenLength: 2 - passwordExp: on - passwordMinDigits: 1 - passwordMinSpecials: 1 + nsslapd-pwpolicy-local: on + passwordCheckSyntax: on + passwordMinCategories: 1 + passwordMinTokenLength: 2 + passwordExp: on + passwordMinDigits: 1 + passwordMinSpecials: 1 :steps: 1: Create a user 2: Attempt to set passwords on the user that are invalid @@ -259,13 +259,13 @@ def test_pwdAdmin_modify(topology_st, password_policy): :id: 85326527-8eeb-401f-9d1b-4ef55dee45a4 :setup: Standalone instance, Password Admin entry, Password policy configured as below: - nsslapd-pwpolicy-local: on - passwordCheckSyntax: on - passwordMinCategories: 1 - passwordMinTokenLength: 2 - passwordExp: on - passwordMinDigits: 1 - passwordMinSpecials: 1 + nsslapd-pwpolicy-local: on + passwordCheckSyntax: on + passwordMinCategories: 1 + passwordMinTokenLength: 2 + passwordExp: on + passwordMinDigits: 1 + passwordMinSpecials: 1 :steps: 1: Retrieve the user 2: Replace the password with invalid content @@ -294,13 +294,13 @@ def test_pwdAdmin_group(topology_st, password_policy): :id: 4d62ae34-0f25-486e-b823-afd2b431e9b0 :setup: Standalone instance, Password Admin entry, Password policy configured as below: - nsslapd-pwpolicy-local: on - passwordCheckSyntax: on - passwordMinCategories: 1 - passwordMinTokenLength: 2 - passwordExp: on - passwordMinDigits: 1 - passwordMinSpecials: 1 + nsslapd-pwpolicy-local: on + passwordCheckSyntax: on + passwordMinCategories: 1 + passwordMinTokenLength: 2 + passwordExp: on + passwordMinDigits: 1 + passwordMinSpecials: 1 :steps: 1: Add group to passwordadmin dn 2: Attempt to set invalid passwords. @@ -331,13 +331,13 @@ def test_pwdAdmin_config_validation(topology_st, password_policy): :id: f7049482-41e8-438b-ae18-cdd2612c783a :setup: Standalone instance, Password Admin entry, Password policy configured as below: - nsslapd-pwpolicy-local: on - passwordCheckSyntax: on - passwordMinCategories: 1 - passwordMinTokenLength: 1 - passwordExp: on - passwordMinDigits: 1 - passwordMinSpecials: 1 + nsslapd-pwpolicy-local: on + passwordCheckSyntax: on + passwordMinCategories: 1 + passwordMinTokenLength: 1 + passwordExp: on + passwordMinDigits: 1 + passwordMinSpecials: 1 :steps: 1. Add multiple attributes - one already exists so just try and add the second one 2. Set passwordAdminDN attribute to an invalid value (ZZZZZ) diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_warning_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_warning_test.py index 98d99ad..b891802 100644 --- a/dirsrvtests/tests/suites/password/pwdPolicy_warning_test.py +++ b/dirsrvtests/tests/suites/password/pwdPolicy_warning_test.py @@ -236,10 +236,10 @@ def test_expiry_time(topology_st, global_policy, add_user): :id: 7adfd395-9b25-4cc0-9b71-14710dc1a28c :setup: Standalone instance, a user entry, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 172800 - passwordWarning: 86400 - passwordSendExpiringTime: on + passwordExp: on + passwordMaxAge: 172800 + passwordWarning: 86400 + passwordSendExpiringTime: on :steps: 1. Bind as the normal user 2. Request password policy control for the user @@ -281,10 +281,10 @@ def test_password_warning(topology_st, global_policy, add_user, attr, val): :parametrized: yes :setup: Standalone instance, a test user, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 172800 - passwordWarning: 86400 - passwordSendExpiringTime: on + passwordExp: on + passwordMaxAge: 172800 + passwordWarning: 86400 + passwordSendExpiringTime: on :steps: 1. Set passwordSendExpiringTime attribute to off or to on and passwordWarning to a small value (3600) @@ -324,10 +324,10 @@ def test_with_different_password_states(topology_st, global_policy, add_user): :id: d297fb1a-661f-4d52-bb43-2a2a340b8b0e :setup: Standalone instance, a user entry, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 172800 - passwordWarning: 86400 - passwordSendExpiringTime: on + passwordExp: on + passwordMaxAge: 172800 + passwordWarning: 86400 + passwordSendExpiringTime: on :steps: 1. Expire user's password by changing passwordExpirationTime timestamp @@ -389,10 +389,10 @@ def test_default_behavior(topology_st, global_policy_default, add_user): :id: c47fa824-ee08-4b78-885f-bca4c42bb655 :setup: Standalone instance, a user entry, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 8640000 - passwordWarning: 86400 - passwordSendExpiringTime: off + passwordExp: on + passwordMaxAge: 8640000 + passwordWarning: 86400 + passwordSendExpiringTime: off :steps: 1. Bind as the normal user 2. Request the control for the user @@ -423,10 +423,10 @@ def test_when_maxage_and_warning_are_the_same(topology_st, global_policy_default :id: e57a1b1c-96fc-11e7-a91b-28d244694824 :setup: Standalone instance, a user entry, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 86400 - passwordWarning: 86400 - passwordSendExpiringTime: off + passwordExp: on + passwordMaxAge: 86400 + passwordWarning: 86400 + passwordSendExpiringTime: off :steps: 1. Bind as the normal user 2. Change user's password to reset its password expiration time @@ -472,10 +472,10 @@ def test_with_local_policy(topology_st, global_policy, local_policy): :id: ab7d9f86-8cfe-48c3-8baa-739e599f006a :setup: Standalone instance, a user entry, Global password policy configured as below: - passwordExp: on - passwordMaxAge: 172800 - passwordWarning: 86400 - passwordSendExpiringTime: on + passwordExp: on + passwordMaxAge: 172800 + passwordWarning: 86400 + passwordSendExpiringTime: on Fine grained password policy for the user using ns-newpwpolicy.pl :steps: 1. Bind as the normal user diff --git a/dirsrvtests/tests/suites/password/pwp_test.py b/dirsrvtests/tests/suites/password/pwp_test.py index a1c2a11..cd1084b 100644 --- a/dirsrvtests/tests/suites/password/pwp_test.py +++ b/dirsrvtests/tests/suites/password/pwp_test.py @@ -431,14 +431,14 @@ def test_passwordlockout(topo, _fix_password): 10. Try to bind with valid pw, should give lockout error 11. Reset password using admin login 12. Try to login as the user to check the unlocking of account. Will also change - the password back to original + the password back to original 13. Change to account lockout forever until reset 14. Reset password retry count (to 0) 15. Try to bind with invalid credentials(3 times) 16. Try to bind with valid pw, should give lockout error 17. Reset password using admin login 18. Try to login as the user to check the unlocking of account. Will also change the - password back to original + password back to original :expected results: 1. Success 2. Success diff --git a/dirsrvtests/tests/suites/password/regression_of_bugs_test.py b/dirsrvtests/tests/suites/password/regression_of_bugs_test.py index d77550a..add1235 100644 --- a/dirsrvtests/tests/suites/password/regression_of_bugs_test.py +++ b/dirsrvtests/tests/suites/password/regression_of_bugs_test.py @@ -243,6 +243,7 @@ def test_admin_group_to_modify_password(topo, _add_user): 25. Success 26. Success 27. Success + 28. Success 29. Fail 30. Fail """ @@ -465,7 +466,7 @@ def test_pwd_update_time_attribute(topo): 8. Record last pwdUpdateTime before changing the password 9. Modify Pwd 10. Set passwordTrackUpdateTime to ON and modify test entry's pwd, - check passwordUpdateTime should be changed + check passwordUpdateTime should be changed 11. Try setting Invalid value for passwordTrackUpdateTime 12. Try setting Invalid value for pwdupdatetime :expected results: @@ -527,12 +528,12 @@ def test_password_track_update_time(topo): 4. Check that attribute passwordUpdate was added to entries 5. check for the pwdupdatetime attribute added to the test entry as passwordTrackUpdateTime is on 6. Set passwordTrackUpdateTime to OFF and modify test entry's pwd, - check passwordUpdateTime should not be changed + check passwordUpdateTime should not be changed 7. Record last pwdUpdateTime before changing the password 8. Modify Pwd 9. Check current pwdUpdateTime 10. Set passwordTrackUpdateTime to ON and modify test entry's pwd, - check passwordUpdateTime should be changed + check passwordUpdateTime should be changed :expected results: 1. Success 2. Success @@ -615,4 +616,4 @@ def test_signal_11(topo): if __name__ == "__main__": CURRENT_FILE = os.path.realpath(__file__) - pytest.main("-s -v %s" % CURRENT_FILE) \ No newline at end of file + pytest.main("-s -v %s" % CURRENT_FILE) diff --git a/dirsrvtests/tests/suites/password/regression_test.py b/dirsrvtests/tests/suites/password/regression_test.py index 38c32ce..81735c0 100644 --- a/dirsrvtests/tests/suites/password/regression_test.py +++ b/dirsrvtests/tests/suites/password/regression_test.py @@ -223,16 +223,16 @@ def test_unhashed_pw_switch(topo_master): :setup: Master Instance :steps: 1. A Master is created, enable retrocl (not used here) - 2. create a set of users + 2. Create a set of users 3. update userpassword of user1 and check that unhashed#user#password is not logged (default) 4. udpate userpassword of user2 and check that unhashed#user#password is not logged ('nolog') 5. udpate userpassword of user3 and check that unhashed#user#password is logged ('on') :expectedresults: 1. Success 2. Success - 3 Success (unhashed#user#password is not logged in the replication changelog) + 3. Success (unhashed#user#password is not logged in the replication changelog) 4. Success (unhashed#user#password is not logged in the replication changelog) - 5. Success (unhashed#user#password is logged in the replication changelog) + 5. Success (unhashed#user#password is logged in the replication changelog) """ MAX_USERS = 10 PEOPLE_DN = ("ou=people," + DEFAULT_SUFFIX) diff --git a/dirsrvtests/tests/suites/plugins/acceptance_test.py b/dirsrvtests/tests/suites/plugins/acceptance_test.py index e9e830d..fd646f2 100644 --- a/dirsrvtests/tests/suites/plugins/acceptance_test.py +++ b/dirsrvtests/tests/suites/plugins/acceptance_test.py @@ -365,6 +365,7 @@ def test_automember(topo, args=None): 2. Success 3. Success 4. Success + 5. Success 6. Success 7. Success 8. Success @@ -529,6 +530,7 @@ def test_dna(topo, args=None): 8. Success 9. Success 10. Success + 11. Success 12. Success """ diff --git a/dirsrvtests/tests/suites/plugins/memberof_test.py b/dirsrvtests/tests/suites/plugins/memberof_test.py index bc99eef..e9329c5 100644 --- a/dirsrvtests/tests/suites/plugins/memberof_test.py +++ b/dirsrvtests/tests/suites/plugins/memberof_test.py @@ -1372,7 +1372,6 @@ def test_complex_group_scenario_3(topology_st): - not grp19_1 - not grp019_2 - not grp019_3 - 6. Assert memofegrp019_2 is member of - not grp1 - not grp2 @@ -1415,19 +1414,19 @@ def test_complex_group_scenario_3(topology_st): - grp019_3 10. Delete user2, user3, and all grp19* entries 11. Assert enh1 is member of - - grp1 (member) - - not grp2 - - grp3 (uniquemember) - - not grp15 - - grp16 (member uniquemember) - - not grp018 + - grp1 (member) + - not grp2 + - grp3 (uniquemember) + - not grp15 + - grp16 (member uniquemember) + - not grp018 12. Assert enh2 is member of - - not grp1 - - grp2 (uniquemember) - - grp3 (member) - - not grp15 - - not grp16 - - not grp018 + - not grp1 + - grp2 (uniquemember) + - grp3 (member) + - not grp15 + - not grp16 + - not grp018 :expectedresults: 1. Success 2. Success @@ -1757,8 +1756,8 @@ def test_complex_group_scenario_5(topology_st): Add user[1-4] and Grp[1-4] Add userX as uniquemember of GrpX Add Grp5 - Grp[1-4] as members of Grp5 - user1 as member of Grp5 + Grp[1-4] as members of Grp5 + user1 as member of Grp5 Check that user1 is member of Grp1 and Grp5 Check that user* are members of Grp5 @@ -1789,21 +1788,21 @@ def test_complex_group_scenario_5(topology_st): 8. Check that grp20_[1-4] are only 'member' of grp20_5 9. Check that user1 are only 'member' of grp20_5 10. Assert enh1 is member of - - grp1 (member) - - not grp2 - - grp3 (uniquemember) - - not grp15 - - grp16 (member uniquemember) - - not grp018 - - not grp20* + - grp1 (member) + - not grp2 + - grp3 (uniquemember) + - not grp15 + - grp16 (member uniquemember) + - not grp018 + - not grp20* 11. Assert enh2 is member of - - not grp1 - - grp2 (uniquemember) - - grp3 (member) - - not grp15 - - not grp16 - - not grp018 - - not grp20* + - not grp1 + - grp2 (uniquemember) + - grp3 (member) + - not grp + - not grp16 + - not grp018 + - not grp20* :expectedresults: 1. Success 2. Success @@ -1965,6 +1964,7 @@ def test_complex_group_scenario_6(topology_st): - grp16 (member uniquemember) - not grp018 - not grp20* + enh2 is member of - not grp1 - grp2 (uniquemember) @@ -1973,6 +1973,7 @@ def test_complex_group_scenario_6(topology_st): - not grp16 - not grp018 - not grp20* + user1 is member of grp20_5 userX is uniquemember of grp20_X grp[1-4] are member of grp20_5 @@ -2251,7 +2252,8 @@ def test_complex_group_scenario_7(topology_st): - grp16 (member uniquemember) - not grp018 - not grp20* - enh2 is member of + + enh2 is member of - not grp1 - grp2 (uniquemember) - grp3 (member) @@ -2259,6 +2261,7 @@ def test_complex_group_scenario_7(topology_st): - not grp16 - not grp018 - not grp20* + grp[1-4] are member of grp20_5 user1 is member (member) of group_5 grp5 is uniqueMember of grp20_[1-4] diff --git a/dirsrvtests/tests/suites/replication/acceptance_test.py b/dirsrvtests/tests/suites/replication/acceptance_test.py index 0cdd7e6..192d08e 100644 --- a/dirsrvtests/tests/suites/replication/acceptance_test.py +++ b/dirsrvtests/tests/suites/replication/acceptance_test.py @@ -119,7 +119,7 @@ def test_modify_entry(topo_m4, create_entry): 4. Attribute should be successfully replaced 5. Some time should pass 6. The change should be present on all masters - 4. Attribute should be successfully deleted + 7. Attribute should be successfully deleted 8. Some time should pass 9. The change should be present on all masters """ diff --git a/dirsrvtests/tests/suites/replication/changelog_test.py b/dirsrvtests/tests/suites/replication/changelog_test.py index 48a0b39..9c6f15d 100644 --- a/dirsrvtests/tests/suites/replication/changelog_test.py +++ b/dirsrvtests/tests/suites/replication/changelog_test.py @@ -228,7 +228,7 @@ def test_cldump_files_removed(topo): :id: fbb2f2a3-167b-4bc6-b513-9e0318b09edc :setup: Replication with two master, nsslapd-changelogdir is '/var/lib/dirsrv/slapd-master1/changelog' - retrochangelog plugin disabled + retrochangelog plugin disabled :steps: 1. Clean the changelog directory, removing .ldif files present, if any 2. Clean the changelog directory, removing .done files present, if any @@ -325,7 +325,7 @@ def test_dsconf_dump_changelog_files_removed(topo): :id: e41dcf90-098a-4386-acb5-789384579bf7 :setup: Replication with two master, nsslapd-changelogdir is '/var/lib/dirsrv/slapd-master1/changelog' - retrochangelog plugin disabled + retrochangelog plugin disabled :steps: 1. Clean the changelog directory, removing .ldif files present, if any 2. Clean the changelog directory, removing .ldif.done files present, if any @@ -543,8 +543,8 @@ def test_changelog_maxage(topo, changelog_init): :id: d284ff27-03b2-412c-ac74-ac4f2d2fae3b :setup: Replication with two master, change nsslapd-changelogdir to - '/var/lib/dirsrv/slapd-master1/changelog' and - set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' + '/var/lib/dirsrv/slapd-master1/changelog' and + set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' :steps: 1. Set nsslapd-changelogmaxage in cn=changelog5,cn=config to values - '12345','10s','30M','12h','2D','4w' 2. Set nsslapd-changelogmaxage in cn=changelog5,cn=config to values - '-123','xyz' @@ -575,8 +575,8 @@ def test_ticket47669_changelog_triminterval(topo, changelog_init): :id: 8f850c37-7e7c-49dd-a4e0-9344638616d6 :setup: Replication with two master, change nsslapd-changelogdir to - '/var/lib/dirsrv/slapd-master1/changelog' and - set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' + '/var/lib/dirsrv/slapd-master1/changelog' and + set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' :steps: 1. Set nsslapd-changelogtrim-interval in cn=changelog5,cn=config to values - '12345','10s','30M','12h','2D','4w' @@ -608,8 +608,8 @@ def test_changelog_compactdbinterval(topo, changelog_init): :id: 0f4b3118-9dfa-4c2a-945c-72847b42a48c :setup: Replication with two master, change nsslapd-changelogdir to - '/var/lib/dirsrv/slapd-master1/changelog' and - set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' + '/var/lib/dirsrv/slapd-master1/changelog' and + set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' :steps: 1. Set nsslapd-changelogcompactdb-interval in cn=changelog5,cn=config to values - '12345','10s','30M','12h','2D','4w' @@ -642,8 +642,8 @@ def test_retrochangelog_maxage(topo, changelog_init): :id: 0cb84d81-3e86-4dbf-84a2-66aefd8281db :setup: Replication with two master, change nsslapd-changelogdir to - '/var/lib/dirsrv/slapd-master1/changelog' and - set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' + '/var/lib/dirsrv/slapd-master1/changelog' and + set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' :steps: 1. Set nsslapd-changelogmaxage in cn=Retro Changelog Plugin,cn=plugins,cn=config to values - '12345','10s','30M','12h','2D','4w' @@ -678,8 +678,8 @@ def test_retrochangelog_trimming_crash(topo, changelog_init): :id: 5d9bd7ca-e9bf-4be9-8fc8-902aa5513052 :setup: Replication with two master, change nsslapd-changelogdir to - '/var/lib/dirsrv/slapd-master1/changelog' and - set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' + '/var/lib/dirsrv/slapd-master1/changelog' and + set cn=Retro Changelog Plugin,cn=plugins,cn=config to 'on' :steps: 1. Set nsslapd-changelogmaxage in cn=Retro Changelog Plugin,cn=plugins,cn=config to value '-1' This value is invalid. To disable retroCL trimming it should be set to 0 diff --git a/dirsrvtests/tests/suites/replication/cleanallruv_test.py b/dirsrvtests/tests/suites/replication/cleanallruv_test.py index 2b3c2a2..6bb59e8 100644 --- a/dirsrvtests/tests/suites/replication/cleanallruv_test.py +++ b/dirsrvtests/tests/suites/replication/cleanallruv_test.py @@ -564,17 +564,16 @@ def test_stress_clean(topology_m4, m4rid): 1. Add a bunch of updates to all masters 2. Put master 4 to read-only mode 3. Disable replication on master 4 - 5. Remove agreements to master 4 from other masters - 6. Run a cleanallruv task on master 1 - 7. Check that everything was cleaned + 4. Remove agreements to master 4 from other masters + 5. Run a cleanallruv task on master 1 + 6. Check that everything was cleaned :expectedresults: 1. Operation should be successful 2. Master 4 should be put to read-only mode 3. Replication on master 4 should be disabled - 2. Agreements to master 4 should be removed - 5. Agreements to master 4 should be removed - 6. Operation should be successful - 7. Everything should be cleaned + 4. Agreements to master 4 should be removed + 5. Operation should be successful + 6. Everything should be cleaned """ log.info('Running test_stress_clean...') diff --git a/dirsrvtests/tests/suites/replication/regression_test.py b/dirsrvtests/tests/suites/replication/regression_test.py index 844d762..d64814f 100644 --- a/dirsrvtests/tests/suites/replication/regression_test.py +++ b/dirsrvtests/tests/suites/replication/regression_test.py @@ -645,6 +645,7 @@ def test_plugin_bind_dn_tracking_and_replication(topo_m2): def test_cleanallruv_repl(topo_m3): """Test that cleanallruv could not break replication if anchor csn in ruv originated in deleted replica + :id: 46faba9a-897e-45b8-98dc-aec7fa8cec9a :setup: 3 Masters :steps: diff --git a/dirsrvtests/tests/suites/replication/tombstone_fixup_test.py b/dirsrvtests/tests/suites/replication/tombstone_fixup_test.py index b9c6aee..b7077aa 100644 --- a/dirsrvtests/tests/suites/replication/tombstone_fixup_test.py +++ b/dirsrvtests/tests/suites/replication/tombstone_fixup_test.py @@ -22,7 +22,7 @@ pytestmark = pytest.mark.tier2 def test_precise_tombstone_purging(topology_m1): """ Test precise tombstone purging - + :id: adb86f50-ae76-4ed6-82b4-3cdc30ccab79 :setup: master1 instance :steps: diff --git a/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py b/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py index 1a2f547..29d4e2e 100644 --- a/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py +++ b/dirsrvtests/tests/suites/resource_limits/fdlimits_test.py @@ -36,7 +36,7 @@ def test_fd_limits(topology_st): 1. Success 2. Success 3. Success - 4 Success + 4. Success """ # Check systemd default diff --git a/dirsrvtests/tests/suites/roles/basic_test.py b/dirsrvtests/tests/suites/roles/basic_test.py index 3f1b756..b694fe5 100644 --- a/dirsrvtests/tests/suites/roles/basic_test.py +++ b/dirsrvtests/tests/suites/roles/basic_test.py @@ -36,18 +36,19 @@ FILTERROLEENGROLE = "cn=FILTERROLEENGROLE,{}".format(DNBASE) def test_filterrole(topo): - ''' - :id: 8ada4064-786b-11e8-8634-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. Search nsconsole role - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - ''' + """Test Filter Role + + :id: 8ada4064-786b-11e8-8634-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. Search nsconsole role + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed + """ Organization(topo.standalone).create(properties={"o": "acivattr"}, basedn=DEFAULT_SUFFIX) properties = { 'ou': 'eng', @@ -137,18 +138,19 @@ def test_filterrole(topo): def test_managedrole(topo): - ''' - :id: d52a9c00-3bf6-11e9-9b7b-8c16451d917b - :setup: server - :steps: - 1. Add test entry - 2. Add ACI - 3. Search managed role entries - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed - ''' + """Test Managed Role + + :id: d52a9c00-3bf6-11e9-9b7b-8c16451d917b + :setup: server + :steps: + 1. Add test entry + 2. Add ACI + 3. Search managed role entries + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed + """ # Create Managed role entry roles = ManagedRoles(topo.standalone, DEFAULT_SUFFIX) role = roles.create(properties={"cn": 'ROLE1'}) @@ -232,17 +234,18 @@ def _final(request, topo): def test_nestedrole(topo, _final): - """ - :id: 867b40c0-7fcf-4332-afc7-bd01025b77f2 - :setup: Standalone server - :steps: - 1. Add test entry - 2. Add ACI - 3. Search managed role entries - :expectedresults: - 1. Entry should be added - 2. Operation should succeed - 3. Operation should succeed + """Test Nested Role + + :id: 867b40c0-7fcf-4332-afc7-bd01025b77f2 + :setup: Standalone server + :steps: + 1. Add test entry + 2. Add ACI + 3. Search managed role entries + :expectedresults: + 1. Entry should be added + 2. Operation should succeed + 3. Operation should succeed """ # Create Managed role entry managed_roles = ManagedRoles(topo.standalone, DEFAULT_SUFFIX) diff --git a/dirsrvtests/tests/suites/schema/schema_replication_test.py b/dirsrvtests/tests/suites/schema/schema_replication_test.py index bc3170f..22ab62c 100644 --- a/dirsrvtests/tests/suites/schema/schema_replication_test.py +++ b/dirsrvtests/tests/suites/schema/schema_replication_test.py @@ -199,7 +199,7 @@ def test_schema_replication_one(topology_m1c1, schema_replication_init): :id: d6c6ff30-b3ae-4001-80ff-0fb18563a393 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Update the schema of supplier, so it will be superset of consumer 2. Push the Schema (no error) @@ -248,7 +248,7 @@ def test_schema_replication_two(topology_m1c1, schema_replication_init): :id: b5db9b75-a9a7-458e-86ec-2a8e7bd1c014 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Update the schema of consumer, so it will be superset of supplier 2. Update the schema of supplier so ti make it's nsSchemaCSN larger than consumer @@ -306,7 +306,7 @@ def test_schema_replication_three(topology_m1c1, schema_replication_init): :id: 45888895-76bc-4cc3-9f90-33a69d027116 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Update the schema of master 2. Push the Schema (no error) @@ -355,7 +355,7 @@ def test_schema_replication_four(topology_m1c1, schema_replication_init): :id: 39304242-2641-4eb8-a9fb-5ff0cf80718f :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add telenumber to 'masterNewOCA' on the master 2. Push the Schema (no error) @@ -404,7 +404,7 @@ def test_schema_replication_five(topology_m1c1, schema_replication_init): :id: 498527df-28c8-4e1a-bc9e-799fd2b7b2bb :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add telenumber to 'consumerNewOCA' on the consumer 2. Add a new OC on the supplier so that its nsSchemaCSN is larger than the consumer @@ -469,7 +469,7 @@ def test_schema_replication_six(topology_m1c1, schema_replication_init): :id: ed57b0cc-6a10-4f89-94ae-9f18542b1954 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add telenumber to 'consumerNewOCA' on the master 2. Push the Schema (no error) @@ -487,11 +487,11 @@ def test_schema_replication_six(topology_m1c1, schema_replication_init): - consumer +masterNewOCA +masterNewOCB +consumerNewOCA +must=telexnumber +must=telexnumber Final state - - supplier +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber - consumer +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber + Note: replication log is enabled to get more details """ _header(topology_m1c1, "Same OC - extra MUST: Schema is pushed - no error") @@ -524,7 +524,7 @@ def test_schema_replication_seven(topology_m1c1, schema_replication_init): :id: 8725055a-b3f8-4d1d-a4d6-bb7dccf644d0 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add telenumber to 'masterNewOCA' on the master 2. Push the Schema (no error) @@ -541,7 +541,7 @@ def test_schema_replication_seven(topology_m1c1, schema_replication_init): +must=telexnumber +must=telexnumber - consumer +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber - Final stat + Final state - supplier +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber +may=postOfficeBox @@ -577,7 +577,7 @@ def test_schema_replication_eight(topology_m1c1, schema_replication_init): :id: 2310d150-a71a-498d-add8-4056beeb58c6 :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add telenumber to 'consumerNewOCA' on the consumer 2. Modify OC on the supplier so that its nsSchemaCSN is larger than the consumer @@ -642,7 +642,7 @@ def test_schema_replication_nine(topology_m1c1, schema_replication_init): :id: 851b24c6-b1e0-466f-9714-aa2940fbfeeb :setup: Master Consumer, check if a warning message is logged in the - error log of the supplier and add a test entry to trigger attempt of schema push. + error log of the supplier and add a test entry to trigger attempt of schema push. :steps: 1. Add postOfficeBox to 'consumerNewOCA' on the master 3. Push the Schema @@ -662,9 +662,7 @@ def test_schema_replication_nine(topology_m1c1, schema_replication_init): - consumer +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber +may=postOfficeBox +may=postOfficeBox - Final state - - supplier +masterNewOCA +masterNewOCB +consumerNewOCA +masterNewOCC +must=telexnumber +must=telexnumber +may=postOfficeBox +may=postOfficeBox +may=postOfficeBox diff --git a/dirsrvtests/tests/suites/tls/cipher_test.py b/dirsrvtests/tests/suites/tls/cipher_test.py index 0589310..8723961 100644 --- a/dirsrvtests/tests/suites/tls/cipher_test.py +++ b/dirsrvtests/tests/suites/tls/cipher_test.py @@ -3,6 +3,7 @@ import os from lib389.config import Encryption from lib389.topologies import topology_st as topo +pytestmark = pytest.mark.tier1 def test_long_cipher_list(topo): """Test a long cipher list, and makre sure it is not truncated diff --git a/dirsrvtests/tests/suites/tls/ssl_version_test.py b/dirsrvtests/tests/suites/tls/ssl_version_test.py index d9dae5a..67da349 100644 --- a/dirsrvtests/tests/suites/tls/ssl_version_test.py +++ b/dirsrvtests/tests/suites/tls/ssl_version_test.py @@ -4,6 +4,8 @@ import os from lib389.config import Encryption from lib389.topologies import topology_st as topo +pytestmark = pytest.mark.tier1 + DEBUGGING = os.getenv("DEBUGGING", default=False) if DEBUGGING: logging.getLogger(__name__).setLevel(logging.DEBUG) diff --git a/dirsrvtests/tests/tickets/ticket49658_test.py b/dirsrvtests/tests/tickets/ticket49658_test.py index 335739f..42aba65 100644 --- a/dirsrvtests/tests/tickets/ticket49658_test.py +++ b/dirsrvtests/tests/tickets/ticket49658_test.py @@ -521,6 +521,7 @@ def test_ticket49658_3(topo): M1: MOD(ADD+DEL) -> V1 M2: MOD(ADD+DEL) -> V1 expected: V1 + :id: b25e508a-8bf2-4351-88f6-3b6c098ccc44 :setup: 3 Master Instances 1. using user_2 where employNumber=1000 @@ -732,6 +733,7 @@ def test_ticket49658_5(topo): M1: MOD(REPL) -> V1 M2: MOD(ADD+DEL) -> V1 expected: V1 + :id: d6b88e3c-a509-4d3e-8e5d-849237993f47 :setup: 3 Master Instances 1. using user_2 where employNumber=1000 diff --git a/src/lib389/lib389/tests/cli/conf_backend_test.py b/src/lib389/lib389/tests/cli/conf_backend_test.py index e6f9268..01513d9 100644 --- a/src/lib389/lib389/tests/cli/conf_backend_test.py +++ b/src/lib389/lib389/tests/cli/conf_backend_test.py @@ -78,6 +78,7 @@ def create_backend(topology_st, request): def test_backend_cli(topology_st, create_backend): """Test creating, listing, getting, and deleting a backend (and subsuffix) + :id: 8a5da6ce-c24a-4d0d-9afb-dfa44ecf4145 :setup: Standalone instance :steps: @@ -192,6 +193,7 @@ def test_backend_cli(topology_st, create_backend): def test_indexes(topology_st, create_backend): """Test creating, listing, getting, and deleting an index + :id: 74e64fea-72c2-4fec-a1fe-bd2d72a075f5 :setup: Standalone instance :steps: @@ -314,6 +316,7 @@ def test_indexes(topology_st, create_backend): def test_attr_encrypt(topology_st, create_backend): """Test adding/removing encrypted attrs + :id: 887429d5-b9be-4e48-b8ca-691e7437abca :setup: Standalone instance :steps: @@ -410,6 +413,7 @@ def test_import_export(topology_st): def test_vlv(topology_st, create_backend): """Test creating, listing, getting, and deleting vlv's + :id: b38bfcf1-f71f-4c08-9221-10f45b4c9b34 :setup: Standalone instance :steps: diff --git a/src/lib389/lib389/tests/cli/conf_chaining_test.py b/src/lib389/lib389/tests/cli/conf_chaining_test.py index 0b44770..8129bdc 100644 --- a/src/lib389/lib389/tests/cli/conf_chaining_test.py +++ b/src/lib389/lib389/tests/cli/conf_chaining_test.py @@ -72,6 +72,7 @@ def create_backend(topology_st, request): def test_chaining_cli(topology_st, create_backend): """Test creating, listing, getting, and deleting a backend (and subsuffix) + :id: 800f432a-52ab-4661-ac66-a2bdd9b984d7 :setup: Standalone instance :steps: diff --git a/src/lib389/lib389/tests/cli/conf_conflicts_test.py b/src/lib389/lib389/tests/cli/conf_conflicts_test.py index 1624c28..60fd881 100644 --- a/src/lib389/lib389/tests/cli/conf_conflicts_test.py +++ b/src/lib389/lib389/tests/cli/conf_conflicts_test.py @@ -39,6 +39,7 @@ def _delete_container(container): def test_conflict_cli(topo): """Test manageing replication conflict entries + :id: 800f432a-52ab-4661-ac66-a2bdd9b984d8 :setup: two masters :steps: diff --git a/src/lib389/lib389/tests/cli/conf_pwpolicy_test.py b/src/lib389/lib389/tests/cli/conf_pwpolicy_test.py index 71caefc..f7285c7 100644 --- a/src/lib389/lib389/tests/cli/conf_pwpolicy_test.py +++ b/src/lib389/lib389/tests/cli/conf_pwpolicy_test.py @@ -48,6 +48,7 @@ def do_setup(topology_st, request): def test_pwp_cli(topology_st, do_setup): """Test creating, listing, getting, and deleting a backend (and subsuffix) + :id: 800f432a-52ab-4661-ac66-a2bdd9b984da :setup: Standalone instance :steps: