#49934 Issue 49930 - Correction of the existing fixture function names to remove test_ prefix
Closed 3 years ago by spichugi. Opened 5 years ago by aadhikari.
aadhikari/389-ds-base fixing-fixture-name  into  master

@@ -889,7 +889,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_users(topology_st):

+ def create_users(topology_st):

      """Add users to the default suffix

      """

  
@@ -910,7 +910,7 @@ 

          })

  

  

- def test_basic_anonymous_search(topology_st, test_users):

+ def test_basic_anonymous_search(topology_st, create_users):

Still have test_ in the name

ok, this is a test function, got it.

      """Tests basic anonymous search operations

  

      :id: c7831e04-f458-4e50-83c7-b6f77109f639
@@ -931,7 +931,7 @@ 

  

  @pytest.mark.ds604

  @pytest.mark.bz915801

- def test_search_original_type(topology_st, test_users):

+ def test_search_original_type(topology_st, create_users):

      """Test ldapsearch returning original attributes

          using nsslapd-search-return-original-type-switch

  

@@ -63,7 +63,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st):

+ def create_user(topology_st):

      """User for binding operation"""

  

      users = UserAccounts(topology_st.standalone, DEFAULT_SUFFIX)
@@ -111,7 +111,7 @@ 

  @pytest.mark.parametrize('add_attr', ['', '*', 'objectClass'])

  @pytest.mark.parametrize('search_suffix,regular_user,oper_attr_list',

                           TEST_PARAMS)

- def test_search_basic(topology_st, test_user, user_aci, add_attr,

+ def test_search_basic(topology_st, create_user, user_aci, add_attr,

                        search_suffix, regular_user, oper_attr_list):

      """Verify that you can get all expected operational attributes

         by a Search Request [RFC2251] with '+' (ASCII 43) filter.
@@ -159,7 +159,7 @@ 

          assert all(attr in found_attrs

                     for attr in ['objectClass', expected_attrs[0]])

      else:

-         assert cmp(found_attrs, expected_attrs) == 0

+         assert set(expected_attrs).issubset(set(found_attrs))

What is this change for?

  

  

  if __name__ == '__main__':

@@ -48,7 +48,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st, request):

+ def create_user(topology_st, request):

      """User for binding operation"""

  

      log.info('Adding user simplepaged_test')
@@ -221,7 +221,7 @@ 

  

  

  @pytest.mark.parametrize("page_size,users_num", [(6, 5), (5, 5), (5, 25)])

- def test_search_success(topology_st, test_user, page_size, users_num):

+ def test_search_success(topology_st, create_user, page_size, users_num):

      """Verify that search with a simple paged results control

      returns all entries it should without errors.

  
@@ -241,8 +241,8 @@ 

      search_flt = r'(uid=test*)'

      searchreq_attrlist = ['dn', 'sn']

  

-     log.info('Set user bind %s ' % test_user)

-     conn = test_user.bind(TEST_USER_PWD)

+     log.info('Set user bind %s ' % create_user)

+     conn = create_user.bind(TEST_USER_PWD)

  

      req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

      all_results = paged_search(conn, DEFAULT_SUFFIX, [req_ctrl], search_flt, searchreq_attrlist)
@@ -264,7 +264,7 @@ 

       ldap.SIZELIMIT_EXCEEDED),

      (5, 50, 'cn=config,%s' % DN_LDBM, 'nsslapd-lookthroughlimit', '20',

       ldap.ADMINLIMIT_EXCEEDED)])

- def test_search_limits_fail(topology_st, test_user, page_size, users_num,

+ def test_search_limits_fail(topology_st, create_user, page_size, users_num,

                              suffix, attr_name, attr_value, expected_err):

      """Verify that search with a simple paged results control

      throws expected exceptoins when corresponding limits are
@@ -293,7 +293,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -343,7 +343,7 @@ 

          change_conf_attr(topology_st, suffix, attr_name, attr_value_bck)

  

  

- def test_search_sort_success(topology_st, test_user):

+ def test_search_sort_success(topology_st, create_user):

      """Verify that search with a simple paged results control

      and a server side sort control returns all entries

      it should without errors.
@@ -367,7 +367,7 @@ 

      searchreq_attrlist = ['dn', 'sn']

  

      try:

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

          sort_ctrl = SSSRequestControl(True, ['sn'])
@@ -388,7 +388,7 @@ 

          del_users(users_list)

  

  

- def test_search_abandon(topology_st, test_user):

+ def test_search_abandon(topology_st, create_user):

      """Verify that search with simple paged results control

      can be abandon

  
@@ -414,7 +414,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -433,7 +433,7 @@ 

          del_users(users_list)

  

  

- def test_search_with_timelimit(topology_st, test_user):

+ def test_search_with_timelimit(topology_st, create_user):

      """Verify that after performing multiple simple paged searches

      to completion, each with a timelimit, it wouldn't fail, if we sleep

      for a time more than the timelimit.
@@ -463,7 +463,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -506,7 +506,7 @@ 

  @pytest.mark.parametrize('aci_subject',

                           ('dns = "{}"'.format(HOSTNAME),

                            'ip = "{}"'.format(IP_ADDRESS)))

- def test_search_dns_ip_aci(topology_st, test_user, aci_subject):

+ 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

  
@@ -549,7 +549,7 @@ 

          ACI_BODY = ensure_bytes(ACI_TARGET + ACI_ALLOW + ACI_SUBJECT)

          topology_st.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_REPLACE, 'aci', ACI_BODY)])

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -572,7 +572,7 @@ 

          del_users(users_list)

  

  

- def test_search_multiple_paging(topology_st, test_user):

+ def test_search_multiple_paging(topology_st, create_user):

      """Verify that after performing multiple simple paged searches

      on a single connection without a complition, it wouldn't fail.

  
@@ -599,7 +599,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -625,7 +625,7 @@ 

  

  

  @pytest.mark.parametrize("invalid_cookie", [1000, -1])

- def test_search_invalid_cookie(topology_st, test_user, invalid_cookie):

+ def test_search_invalid_cookie(topology_st, create_user, invalid_cookie):

      """Verify that using invalid cookie while performing

      search with the simple paged results control throws

      a TypeError exception
@@ -653,7 +653,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -673,7 +673,7 @@ 

          del_users(users_list)

  

  

- def test_search_abandon_with_zero_size(topology_st, test_user):

+ def test_search_abandon_with_zero_size(topology_st, create_user):

      """Verify that search with simple paged results control

      can be abandon using page_size = 0

  
@@ -697,7 +697,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
@@ -716,7 +716,7 @@ 

          del_users(users_list)

  

  

- def test_search_pagedsizelimit_success(topology_st, test_user):

+ def test_search_pagedsizelimit_success(topology_st, create_user):

      """Verify that search with a simple paged results control

      returns all entries it should without errors while

      valid value set to nsslapd-pagedsizelimit.
@@ -746,7 +746,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

          controls = [req_ctrl]
@@ -763,7 +763,7 @@ 

  

  @pytest.mark.parametrize('conf_attr,user_attr,expected_rs',

                           (('5', '15', 'PASS'), ('15', '5', ldap.SIZELIMIT_EXCEEDED)))

- def test_search_nspagedsizelimit(topology_st, test_user,

+ def test_search_nspagedsizelimit(topology_st, create_user,

                                   conf_attr, user_attr, expected_rs):

      """Verify that nsPagedSizeLimit attribute overrides

      nsslapd-pagedsizelimit while performing search with
@@ -804,11 +804,11 @@ 

      search_flt = r'(uid=test*)'

      searchreq_attrlist = ['dn', 'sn']

      conf_attr_bck = change_conf_attr(topology_st, DN_CONFIG, 'nsslapd-pagedsizelimit', conf_attr)

-     user_attr_bck = change_conf_attr(topology_st, test_user.dn, 'nsPagedSizeLimit', user_attr)

+     user_attr_bck = change_conf_attr(topology_st, create_user.dn, 'nsPagedSizeLimit', user_attr)

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

          controls = [req_ctrl]
@@ -826,13 +826,13 @@ 

      finally:

          del_users(users_list)

          change_conf_attr(topology_st, DN_CONFIG, 'nsslapd-pagedsizelimit', conf_attr_bck)

-         change_conf_attr(topology_st, test_user.dn, 'nsPagedSizeLimit', user_attr_bck)

+         change_conf_attr(topology_st, create_user.dn, 'nsPagedSizeLimit', user_attr_bck)

  

  

  @pytest.mark.parametrize('conf_attr_values,expected_rs',

                           ((('5000', '100', '100'), ldap.ADMINLIMIT_EXCEEDED),

                            (('5000', '120', '122'), 'PASS')))

- def test_search_paged_limits(topology_st, test_user, conf_attr_values, expected_rs):

+ def test_search_paged_limits(topology_st, create_user, conf_attr_values, expected_rs):

      """Verify that nsslapd-idlistscanlimit and

      nsslapd-lookthroughlimit can limit the administrator

      search abilities.
@@ -879,7 +879,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

          controls = [req_ctrl]
@@ -904,7 +904,7 @@ 

  @pytest.mark.parametrize('conf_attr_values,expected_rs',

                           ((('1000', '100', '100'), ldap.ADMINLIMIT_EXCEEDED),

                            (('1000', '120', '122'), 'PASS')))

- def test_search_paged_user_limits(topology_st, test_user, conf_attr_values, expected_rs):

+ def test_search_paged_user_limits(topology_st, create_user, conf_attr_values, expected_rs):

      """Verify that nsPagedIDListScanLimit and nsPagedLookthroughLimit

      override nsslapd-idlistscanlimit and nsslapd-lookthroughlimit

      while performing search with the simple paged results control.
@@ -947,12 +947,12 @@ 

      searchreq_attrlist = ['dn', 'sn']

      lookthrough_attr_bck = change_conf_attr(topology_st, 'cn=config,%s' % DN_LDBM, 'nsslapd-lookthroughlimit', conf_attr_values[0])

      idlistscan_attr_bck = change_conf_attr(topology_st, 'cn=config,%s' % DN_LDBM, 'nsslapd-idlistscanlimit', conf_attr_values[0])

-     user_idlistscan_attr_bck = change_conf_attr(topology_st, test_user.dn, 'nsPagedIDListScanLimit', conf_attr_values[1])

-     user_lookthrough_attr_bck = change_conf_attr(topology_st, test_user.dn, 'nsPagedLookthroughLimit', conf_attr_values[2])

+     user_idlistscan_attr_bck = change_conf_attr(topology_st, create_user.dn, 'nsPagedIDListScanLimit', conf_attr_values[1])

+     user_lookthrough_attr_bck = change_conf_attr(topology_st, create_user.dn, 'nsPagedLookthroughLimit', conf_attr_values[2])

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

          controls = [req_ctrl]
@@ -970,11 +970,11 @@ 

          del_users(users_list)

          change_conf_attr(topology_st, 'cn=config,%s' % DN_LDBM, 'nsslapd-lookthroughlimit', lookthrough_attr_bck)

          change_conf_attr(topology_st, 'cn=config,%s' % DN_LDBM, 'nsslapd-idlistscanlimit', idlistscan_attr_bck)

-         change_conf_attr(topology_st, test_user.dn, 'nsPagedIDListScanLimit', user_idlistscan_attr_bck)

-         change_conf_attr(topology_st, test_user.dn, 'nsPagedLookthroughLimit', user_lookthrough_attr_bck)

+         change_conf_attr(topology_st, create_user.dn, 'nsPagedIDListScanLimit', user_idlistscan_attr_bck)

+         change_conf_attr(topology_st, create_user.dn, 'nsPagedLookthroughLimit', user_lookthrough_attr_bck)

  

  

- def test_ger_basic(topology_st, test_user):

+ def test_ger_basic(topology_st, create_user):

      """Verify that search with a simple paged results control

      and get effective rights control returns all entries

      it should without errors.
@@ -1011,7 +1011,7 @@ 

          del_users(users_list)

  

  

- def test_multi_suffix_search(topology_st, test_user, new_suffixes):

+ def test_multi_suffix_search(topology_st, create_user, new_suffixes):

      """Verify that page result search returns empty cookie

      if there is no returned entry.

  
@@ -1069,7 +1069,7 @@ 

  

  

  @pytest.mark.parametrize('conf_attr_value', (None, '-1', '1000'))

- def test_maxsimplepaged_per_conn_success(topology_st, test_user, conf_attr_value):

+ def test_maxsimplepaged_per_conn_success(topology_st, create_user, conf_attr_value):

      """Verify that nsslapd-maxsimplepaged-per-conn acts according design

  

      :id: 192e2f25-04ee-4ff9-9340-d875dcbe8011
@@ -1096,7 +1096,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

  
@@ -1112,7 +1112,7 @@ 

  

  

  @pytest.mark.parametrize('conf_attr_value', ('0', '1'))

- def test_maxsimplepaged_per_conn_failure(topology_st, test_user, conf_attr_value):

+ def test_maxsimplepaged_per_conn_failure(topology_st, create_user, conf_attr_value):

      """Verify that nsslapd-maxsimplepaged-per-conn acts according design

  

      :id: eb609e63-2829-4331-8439-a35f99694efa
@@ -1140,7 +1140,7 @@ 

  

      try:

          log.info('Set user bind')

-         conn = test_user.bind(TEST_USER_PWD)

+         conn = create_user.bind(TEST_USER_PWD)

  

          log.info('Create simple paged results control instance')

          req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')

@@ -32,7 +32,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st, request):

+ def create_user(topology_st, request):

      """User for binding operation"""

  

      log.info('Adding user {}'.format(TEST_USER_DN))
@@ -60,7 +60,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def password_policy(topology_st, test_user):

+ def password_policy(topology_st, create_user):

      """Set up password policy for subtree and user"""

  

      log.info('Enable fine-grained policy')
@@ -122,7 +122,7 @@ 

                           [('on', 'off', ldap.UNWILLING_TO_PERFORM),

                            ('off', 'off', ldap.UNWILLING_TO_PERFORM),

                            ('off', 'on', None), ('on', 'on', None)])

- def test_change_pwd(topology_st, test_user, password_policy,

+ def test_change_pwd(topology_st, create_user, password_policy,

                      subtree_pwchange, user_pwchange, exception):

      """Verify that 'passwordChange' attr works as expected

      User should have a priority over a subtree.
@@ -194,7 +194,7 @@ 

                                                          ensure_bytes(TEST_USER_PWD))])

  

  

- def test_pwd_min_age(topology_st, test_user, password_policy):

+ def test_pwd_min_age(topology_st, create_user, password_policy):

      """If we set passwordMinAge to some value, for example to 10, then it

      should not allow the user to change the password within 10 seconds after

      his previous change.

@@ -37,7 +37,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st, request):

+ def create_user(topology_st, request):

      """User for binding operation"""

  

      log.info('Adding user {}'.format(BN))
@@ -71,7 +71,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def password_policy(topology_st, test_user):

+ def password_policy(topology_st, create_user):

      """Set global password policy.

      Then, set fine-grained subtree level password policy

      to ou=People with no password syntax.
@@ -140,7 +140,7 @@ 

  

  @pytest.mark.parametrize('inherit_value,checksyntax_value',

                           [('off', 'off'), ('on', 'off'), ('off', 'on')])

- def test_entry_has_no_restrictions(topology_st, password_policy, test_user,

+ def test_entry_has_no_restrictions(topology_st, password_policy, create_user,

                                     inherit_value, checksyntax_value):

      """Make sure an entry added to ou=people has no password syntax restrictions

  
@@ -201,7 +201,7 @@ 

  

  

  @pytest.mark.parametrize('container', [DN_CONFIG, PWP_CONTAINER_PEOPLE])

- def test_entry_has_restrictions(topology_st, password_policy, test_user, container):

+ def test_entry_has_restrictions(topology_st, password_policy, create_user, container):

      """Set 'nsslapd-pwpolicy-inherit-global: on' and 'passwordCheckSyntax: on'.

      Make sure that syntax rules work, if set them at both: cn=config and

      ou=people policy container.

@@ -34,7 +34,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st):

+ def create_user(topology_st):

      """Create the test user."""

  

      topology_st.standalone.add_s(Entry((
@@ -132,7 +132,7 @@ 

      setPolicy(inst, policy_attr, reset_value)

  

  

- def test_basic(topology_st, test_user, password_policy):

+ def test_basic(topology_st, create_user, password_policy):

      """Ensure that on a password change, the policy syntax

      is enforced correctly.

  

@@ -68,7 +68,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topo, request):

+ def create_user(topo, request):

      """Add test users using UserAccounts"""

  

      log.info('Adding user-uid={},ou=people,{}'.format(user_data['uid'], SUFFIX))
@@ -89,7 +89,7 @@ 

      return tuser

  

  

- def test_pwp_local_unlock(topo, passw_policy, test_user):

+ def test_pwp_local_unlock(topo, passw_policy, create_user):

      """Test subtree policies use the same global default for passwordUnlock

  

      :id: 741a8417-5f65-4012-b9ed-87987ce3ca1b
@@ -105,12 +105,12 @@ 

      """

  

      log.info("Verify user can bind...")

-     test_user.bind(PASSWORD)

+     create_user.bind(PASSWORD)

  

      log.info('Test passwordUnlock default - user should be able to reset password after lockout')

      for i in range(0, 2):

          try:

-             test_user.bind("bad-password")

+             create_user.bind("bad-password")

          except ldap.INVALID_CREDENTIALS:

              # expected

              pass
@@ -120,18 +120,18 @@ 

  

      log.info('Verify account is locked')

      with pytest.raises(ldap.CONSTRAINT_VIOLATION):

-         test_user.bind(PASSWORD)

+         create_user.bind(PASSWORD)

  

      log.info('Wait for lockout duration...')

      time.sleep(4)

  

      log.info('Check if user can now bind with correct password')

-     test_user.bind(PASSWORD)

+     create_user.bind(PASSWORD)

  

  

  @pytest.mark.bz1465600

  @pytest.mark.parametrize("user_pasw", TEST_PASSWORDS)

- def test_trivial_passw_check(topo, passw_policy, test_user, user_pasw):

+ def test_trivial_passw_check(topo, passw_policy, create_user, user_pasw):

      """PasswordCheckSyntax attribute fails to validate cn, sn, uid, givenname, ou and mail attributes

  

      :id: bf9fe1ef-56cb-46a3-a6f8-5530398a06dc
@@ -148,20 +148,20 @@ 

          4. Resetting userPassword to cn, sn, uid and mail should be rejected.

      """

  

-     conn = test_user.bind(PASSWORD)

+     conn = create_user.bind(PASSWORD)

      try:

          log.info('Replace userPassword attribute with {}'.format(user_pasw))

          with pytest.raises(ldap.CONSTRAINT_VIOLATION) as excinfo:

-             conn.modify_s(test_user.dn, [(ldap.MOD_REPLACE, 'userPassword', ensure_bytes(user_pasw))])

+             conn.modify_s(create_user.dn, [(ldap.MOD_REPLACE, 'userPassword', ensure_bytes(user_pasw))])

              log.fatal('Failed: Userpassword with {} is accepted'.format(user_pasw))

          assert 'password based off of user entry' in str(excinfo.value)

      finally:

          conn.unbind_s()

-         test_user.set('userPassword', PASSWORD)

+         create_user.set('userPassword', PASSWORD)

  

  

  @pytest.mark.parametrize("user_pasw", TEST_PASSWORDS)

- def test_global_vs_local(topo, passw_policy, test_user, user_pasw):

+ def test_global_vs_local(topo, passw_policy, create_user, user_pasw):

      """Passwords rejected if its similar to uid, cn, sn, givenname, ou and mail attributes

  

      :id: dfd6cf5d-8bcd-4895-a691-a43ad9ec1be8
@@ -179,17 +179,17 @@ 

      log.info('Configure Pwpolicy with PasswordCheckSyntax and nsslapd-pwpolicy-local set to off')

      topo.standalone.config.set('nsslapd-pwpolicy-local', 'off')

  

-     conn = test_user.bind(PASSWORD)

+     conn = create_user.bind(PASSWORD)

      log.info('Replace userPassword attribute with {}'.format(user_pasw))

      try:

          try:

-             conn.modify_s(test_user.dn, [(ldap.MOD_REPLACE, 'userPassword', ensure_bytes(user_pasw))])

+             conn.modify_s(create_user.dn, [(ldap.MOD_REPLACE, 'userPassword', ensure_bytes(user_pasw))])

          except ldap.LDAPError as e:

              log.fatal('Failed to replace userPassword: error {}'.format(e.message['desc']))

              raise e

      finally:

          conn.unbind_s()

-         test_user.set('userPassword', PASSWORD)

+         create_user.set('userPassword', PASSWORD)

  

  

  if __name__ == '__main__':

@@ -31,7 +31,7 @@ 

  

  

  @pytest.fixture(scope="function")

- def test_entry(topo_m4, request):

+ def create_entry(topo_m4, request):

      """Add test entry to master1"""

  

      log.info('Adding entry {}'.format(TEST_ENTRY_DN))
@@ -79,7 +79,7 @@ 

      request.addfinalizer(fin)

  

  

- def test_add_entry(topo_m4, test_entry):

+ def test_add_entry(topo_m4, create_entry):

      """Check that entries are replicated after add operation

  

      :id: 024250f1-5f7e-4f3b-a9f5-27741e6fd405
@@ -94,7 +94,7 @@ 

      assert all(entries), "Entry {} wasn't replicated successfully".format(TEST_ENTRY_DN)

  

  

- def test_modify_entry(topo_m4, test_entry):

+ def test_modify_entry(topo_m4, create_entry):

      """Check that entries are replicated after modify operation

  

      :id: 36764053-622c-43c2-a132-d7a3ab7d9aaa
@@ -148,7 +148,7 @@ 

          assert "{}@greenhat.com".format(TEST_ENTRY_NAME) not in u.get_attr_vals_utf8('mail')

  

  

- def test_delete_entry(topo_m4, test_entry):

+ def test_delete_entry(topo_m4, create_entry):

      """Check that entry deletion is replicated after delete operation

  

      :id: 18437262-9d6a-4b98-a47a-6182501ab9bc
@@ -169,7 +169,7 @@ 

  

  

  @pytest.mark.parametrize("delold", [0, 1])

- def test_modrdn_entry(topo_m4, test_entry, delold):

+ def test_modrdn_entry(topo_m4, create_entry, delold):

      """Check that entries are replicated after modrdn operation

  

      :id: 02558e6d-a745-45ae-8d88-34fe9b16adc9
@@ -324,7 +324,7 @@ 

      repl.remove_master(m1)

      repl.remove_master(m2)

  

- def test_many_attrs(topo_m4, test_entry):

+ def test_many_attrs(topo_m4, create_entry):

      """Check a replication with many attributes (add and delete)

  

      :id: d540b358-f67a-43c6-8df5-7c74b3cb7523
@@ -366,7 +366,7 @@ 

              assert value not in delete_list

  

  

- def test_double_delete(topo_m4, test_entry):

+ def test_double_delete(topo_m4, create_entry):

      """Check that double delete of the entry doesn't crash server

  

      :ID: 3496c82d-636a-48c9-973c-2455b12164cc
@@ -392,7 +392,7 @@ 

      assert not entries, "Entry deletion {} wasn't replicated successfully".format(TEST_ENTRY_DN)

  

  

- def test_password_repl_error(topo_m4, test_entry):

+ def test_password_repl_error(topo_m4, create_entry):

      """Check that error about userpassword replication is properly logged

  

      :ID: 714130ff-e4f0-4633-9def-c1f4b24abfef

@@ -114,7 +114,7 @@ 

      M1 = topology.ms["master1"]

  

      conts = nsContainers(M1, SUFFIX)

-     test_base = conts.create(properties={'cn': 'test_container'})

+     base_m2 = conts.create(properties={'cn': 'test_container'})

  

      for inst in topology:

          inst.config.loglevel([ErrorLog.DEFAULT, ErrorLog.REPLICA], service='error')
@@ -123,13 +123,13 @@ 

          inst.config.enable_log('audit')

          inst.restart()

  

-     return test_base

+     return base_m2

  

  

- def _delete_test_base(inst, test_base_dn):

+ def _delete_test_base(inst, base_m2_dn):

      """Delete test container with entries and entry conflicts"""

  

-     ents = inst.search_s(test_base_dn, ldap.SCOPE_SUBTREE, filterstr="(|(objectclass=*)(objectclass=ldapsubentry))")

+     ents = inst.search_s(base_m2_dn, ldap.SCOPE_SUBTREE, filterstr="(|(objectclass=*)(objectclass=ldapsubentry))")

  

      for ent in sorted(ents, key=lambda e: len(e.dn), reverse=True):

          log.debug("Delete entry children {}".format(ent.dn))
@@ -140,7 +140,7 @@ 

  

  

  @pytest.fixture

- def test_base(topology_m2, request):

+ def base_m2(topology_m2, request):

      tb = _test_base(topology_m2)

  

      def fin():
@@ -152,7 +152,7 @@ 

  

  

  @pytest.fixture

- def test_base_m3(topology_m3, request):

+ def base_m3(topology_m3, request):

      tb = _test_base(topology_m3)

  

      def fin():
@@ -164,7 +164,7 @@ 

  

  

  class TestTwoMasters:

-     def test_add_modrdn(self, topology_m2, test_base):

+     def test_add_modrdn(self, topology_m2, base_m2):

          """Check that conflict properly resolved for create - modrdn operations

  

          :id: 77f09b18-03d1-45da-940b-1ad2c2908ebb
@@ -194,8 +194,8 @@ 

  

          M1 = topology_m2.ms["master1"]

          M2 = topology_m2.ms["master2"]

-         test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)

-         test_users_m2 = UserAccounts(M2, test_base.dn, rdn=None)

+         test_users_m1 = UserAccounts(M1, base_m2.dn, rdn=None)

+         test_users_m2 = UserAccounts(M2, base_m2.dn, rdn=None)

          repl = ReplicationManager(SUFFIX)

  

          for user_num in range(1000, 1005):
@@ -233,7 +233,7 @@ 

          user_dns_m2 = [user.dn for user in test_users_m2.list()]

          assert set(user_dns_m1) == set(user_dns_m2)

  

-     def test_complex_add_modify_modrdn_delete(self, topology_m2, test_base):

+     def test_complex_add_modify_modrdn_delete(self, topology_m2, base_m2):

          """Check that conflict properly resolved for complex operations

          which involve add, modify, modrdn and delete

  
@@ -269,8 +269,8 @@ 

          M1 = topology_m2.ms["master1"]

          M2 = topology_m2.ms["master2"]

  

-         test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)

-         test_users_m2 = UserAccounts(M2, test_base.dn, rdn=None)

+         test_users_m1 = UserAccounts(M1, base_m2.dn, rdn=None)

+         test_users_m2 = UserAccounts(M2, base_m2.dn, rdn=None)

          repl = ReplicationManager(SUFFIX)

  

          for user_num in range(1100, 1110):
@@ -365,7 +365,7 @@ 

          user_dns_m2 = [user.dn for user in test_users_m2.list()]

          assert set(user_dns_m1) == set(user_dns_m2)

  

-     def test_memberof_groups(self, topology_m2, test_base):

+     def test_memberof_groups(self, topology_m2, base_m2):

          """Check that conflict properly resolved for operations

          with memberOf and groups

  
@@ -400,9 +400,9 @@ 

  

          M1 = topology_m2.ms["master1"]

          M2 = topology_m2.ms["master2"]

-         test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)

-         test_groups_m1 = Groups(M1, test_base.dn, rdn=None)

-         test_groups_m2 = Groups(M2, test_base.dn, rdn=None)

+         test_users_m1 = UserAccounts(M1, base_m2.dn, rdn=None)

+         test_groups_m1 = Groups(M1, base_m2.dn, rdn=None)

+         test_groups_m2 = Groups(M2, base_m2.dn, rdn=None)

  

          repl = ReplicationManager(SUFFIX)

  
@@ -539,7 +539,7 @@ 

          user_dns_m2 = [user.dn for user in test_users_m2.list()]

          assert set(user_dns_m1) == set(user_dns_m2)

  

-     def test_nested_entries_with_children(self, topology_m2, test_base):

+     def test_nested_entries_with_children(self, topology_m2, base_m2):

          """Check that conflict properly resolved for operations

          with nested entries with children

  
@@ -583,14 +583,14 @@ 

          M1 = topology_m2.ms["master1"]

          M2 = topology_m2.ms["master2"]

          repl = ReplicationManager(SUFFIX)

-         test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)

-         test_users_m2 = UserAccounts(M2, test_base.dn, rdn=None)

+         test_users_m1 = UserAccounts(M1, base_m2.dn, rdn=None)

+         test_users_m2 = UserAccounts(M2, base_m2.dn, rdn=None)

          _create_user(test_users_m1, 4000)

          _create_user(test_users_m1, 4001)

  

          cont_list = []

          for num in range(15):

-             cont = _create_container(M1, test_base.dn, 'sub{}'.format(num))

+             cont = _create_container(M1, base_m2.dn, 'sub{}'.format(num))

              cont_list.append(cont)

  

          repl.test_replication(M1, M2)
@@ -598,20 +598,20 @@ 

          topology_m2.pause_all_replicas()

  

          log.info("Create parent-child on master2 and master1")

-         _create_container(M2, test_base.dn, 'p0', sleep=True)

-         cont_p = _create_container(M1, test_base.dn, 'p0', sleep=True)

+         _create_container(M2, base_m2.dn, 'p0', sleep=True)

+         cont_p = _create_container(M1, base_m2.dn, 'p0', sleep=True)

          _create_container(M1, cont_p.dn, 'c0', sleep=True)

          _create_container(M2, cont_p.dn, 'c0', sleep=True)

  

          log.info("Create parent-child on master1 and master2")

-         cont_p = _create_container(M1, test_base.dn, 'p1', sleep=True)

-         _create_container(M2, test_base.dn, 'p1', sleep=True)

+         cont_p = _create_container(M1, base_m2.dn, 'p1', sleep=True)

+         _create_container(M2, base_m2.dn, 'p1', sleep=True)

          _create_container(M1, cont_p.dn, 'c1', sleep=True)

          _create_container(M2, cont_p.dn, 'c1', sleep=True)

  

          log.info("Create parent-child on master1 and master2 different child rdn")

-         cont_p = _create_container(M1, test_base.dn, 'p2', sleep=True)

-         _create_container(M2, test_base.dn, 'p2', sleep=True)

+         cont_p = _create_container(M1, base_m2.dn, 'p2', sleep=True)

+         _create_container(M2, base_m2.dn, 'p2', sleep=True)

          _create_container(M1, cont_p.dn, 'c2', sleep=True)

          _create_container(M2, cont_p.dn, 'c3', sleep=True)

  
@@ -746,7 +746,7 @@ 

          for num in range(1, 3):

              inst = topology_m2.ms["master{}".format(num)]

              conts_dns[inst.serverid] = []

-             conts = nsContainers(inst, test_base.dn)

+             conts = nsContainers(inst, base_m2.dn)

              for cont in conts.list():

                  conts_p = nsContainers(inst, cont.dn)

                  for cont_p in conts_p.list():
@@ -763,7 +763,7 @@ 

  

  

  class TestThreeMasters:

-     def test_nested_entries(self, topology_m3, test_base_m3):

+     def test_nested_entries(self, topology_m3, base_m3):

          """Check that conflict properly resolved for operations

          with nested entries with children

  
@@ -800,7 +800,7 @@ 

  

          cont_list = []

          for num in range(11):

-             cont = _create_container(M1, test_base_m3.dn, 'sub{}'.format(num))

+             cont = _create_container(M1, base_m3.dn, 'sub{}'.format(num))

              cont_list.append(cont)

  

          repl.test_replication(M1, M2)
@@ -858,7 +858,7 @@ 

          for num in range(1, 4):

              inst = topology_m3.ms["master{}".format(num)]

              conts_dns[inst.serverid] = []

-             conts = nsContainers(inst, test_base_m3.dn)

+             conts = nsContainers(inst, base_m3.dn)

              for cont in conts.list():

                  conts_p = nsContainers(inst, cont.dn)

                  for cont_p in conts_p.list():
@@ -876,5 +876,3 @@ 

      # -s for DEBUG mode

      CURRENT_FILE = os.path.realpath(__file__)

      pytest.main("-s %s" % CURRENT_FILE)

- 

- 

@@ -72,7 +72,7 @@ 

      return count

  

  @pytest.fixture()

- def test_entry(topo_m2, request):

+ def create_entry(topo_m2, request):

      """Add test entry using UserAccounts"""

  

      log.info('Adding a test entry user')
@@ -81,7 +81,7 @@ 

      return tuser

  

  

- def test_double_delete(topo_m2, test_entry):

+ def test_double_delete(topo_m2, create_entry):

      """Check that double delete of the entry doesn't crash server

  

      :id: 3496c82d-636a-48c9-973c-2455b12164cc
@@ -103,11 +103,11 @@ 

      repl.disable_to_master(m1, [m2])

      repl.disable_to_master(m2, [m1])

  

-     log.info('Deleting entry {} from master1'.format(test_entry.dn))

-     topo_m2.ms["master1"].delete_s(test_entry.dn)

+     log.info('Deleting entry {} from master1'.format(create_entry.dn))

+     topo_m2.ms["master1"].delete_s(create_entry.dn)

  

-     log.info('Deleting entry {} from master2'.format(test_entry.dn))

-     topo_m2.ms["master2"].delete_s(test_entry.dn)

+     log.info('Deleting entry {} from master2'.format(create_entry.dn))

+     topo_m2.ms["master2"].delete_s(create_entry.dn)

  

      repl.enable_to_master(m2, [m1])

      repl.enable_to_master(m1, [m2])
@@ -201,7 +201,7 @@ 

  

  

  

- def test_password_repl_error(topo_m2, test_entry):

+ def test_password_repl_error(topo_m2, create_entry):

      """Check that error about userpassword replication is properly logged

  

      :id: 714130ff-e4f0-4633-9def-c1f4b24abfef
@@ -226,9 +226,9 @@ 

      log.info('Set replication loglevel')

      m2.config.loglevel((ErrorLog.REPLICA,))

  

-     log.info('Modifying entry {} - change userpassword on master 1'.format(test_entry.dn))

+     log.info('Modifying entry {} - change userpassword on master 1'.format(create_entry.dn))

  

-     test_entry.set('userpassword', TEST_ENTRY_NEW_PASS)

+     create_entry.set('userpassword', TEST_ENTRY_NEW_PASS)

  

      repl = ReplicationManager(DEFAULT_SUFFIX)

      repl.wait_for_replication(m1, m2)
@@ -239,11 +239,11 @@ 

  

      try:

          log.info('Check that password works on master 2')

-         test_entry_m2 = UserAccount(m2, test_entry.dn)

-         test_entry_m2.bind(TEST_ENTRY_NEW_PASS)

+         create_entry_m2 = UserAccount(m2, create_entry.dn)

+         create_entry_m2.bind(TEST_ENTRY_NEW_PASS)

  

-         log.info('Check the error log for the error with {}'.format(test_entry.dn))

-         assert not m2.ds_error_log.match('.*can.t add a change for {}.*'.format(test_entry.dn))

+         log.info('Check the error log for the error with {}'.format(create_entry.dn))

+         assert not m2.ds_error_log.match('.*can.t add a change for {}.*'.format(create_entry.dn))

      finally:

          log.info('Set the default loglevel')

          m2.config.loglevel((ErrorLog.DEFAULT,))
@@ -340,7 +340,7 @@ 

      users = UserAccounts(M1, PEOPLE, rdn=None)

      user_props = TEST_USER_PROPERTIES.copy()

      user_props.update({'uid': uid, 'cn': uid, 'sn': '_%s' % uid, 'userpassword': PASSWD.encode(), 'description': b'value creation'})

-     test_user = users.create(properties=user_props)

+     create_user = users.create(properties=user_props)

  

      groups_M1 = Groups(M1, DEFAULT_SUFFIX)

      group_properties = {
@@ -348,7 +348,7 @@ 

          'description' : 'testgroup'}

      group_M1 = groups_M1.create(properties=group_properties)

      group_M2 = Group(M2, group_M1.dn)

-     assert(not group_M1.is_member(test_user.dn))

+     assert(not group_M1.is_member(create_user.dn))

  

  

  
@@ -377,7 +377,7 @@ 

      for inst in (M1, M2):

          agmts = Agreements(inst)

          agmt = agmts.list()[0]

-         agmt.replace('nsDS5ReplicaBindDN', test_user.dn.encode())

+         agmt.replace('nsDS5ReplicaBindDN', create_user.dn.encode())

          agmt.replace('nsds5ReplicaCredentials', PASSWD.encode())

  

  
@@ -393,18 +393,18 @@ 

  

      # Replication being broken here we need to directly do the same update.

      # Sorry not found another solution except total update

-     group_M1.add_member(test_user.dn)

-     group_M2.add_member(test_user.dn)

+     group_M1.add_member(create_user.dn)

+     group_M2.add_member(create_user.dn)

  

      topo_m2.resume_all_replicas()

  

      # trigger updates to be sure to have a replication session, giving some time

-     M1.modify_s(test_user.dn,[(ldap.MOD_ADD, 'description', b'value_1_1')])

-     M2.modify_s(test_user.dn,[(ldap.MOD_ADD, 'description', b'value_2_2')])

+     M1.modify_s(create_user.dn,[(ldap.MOD_ADD, 'description', b'value_1_1')])

+     M2.modify_s(create_user.dn,[(ldap.MOD_ADD, 'description', b'value_2_2')])

      time.sleep(10)

  

      # Check replication is working

-     ents = M1.search_s(test_user.dn, ldap.SCOPE_BASE, '(objectclass=*)')

+     ents = M1.search_s(create_user.dn, ldap.SCOPE_BASE, '(objectclass=*)')

      for ent in ents:

          assert (ent.hasAttr('description'))

          found = 0
@@ -415,7 +415,7 @@ 

                  found = found + 1

          assert (found == 2)

  

-     ents = M2.search_s(test_user.dn, ldap.SCOPE_BASE, '(objectclass=*)')

+     ents = M2.search_s(create_user.dn, ldap.SCOPE_BASE, '(objectclass=*)')

      for ent in ents:

          assert (ent.hasAttr('description'))

          found = 0
@@ -559,4 +559,3 @@ 

      # -s for DEBUG mode

      CURRENT_FILE = os.path.realpath(__file__)

      pytest.main("-s %s" % CURRENT_FILE)

- 

@@ -17,7 +17,7 @@ 

  

  

  @pytest.fixture(scope="module")

- def test_user(topology_st):

+ def create_user(topology_st):

      """User for binding operation"""

  

      try:
@@ -153,7 +153,7 @@ 

      return all_results

  

  

- def test_ticket48808(topology_st, test_user):

+ def test_ticket48808(topology_st, create_user):

      log.info('Run multiple paging controls on a single connection')

      users_num = 100

      page_size = 30

Description: Fixed fixture names and also python3 issue.

https://pagure.io/389-ds-base/issue/49930

Reviewed by: ??

@amsharma cmp() is not supported in python3, so added py3 support.

[root@server ds]# py.test -v $(git show --pretty="" --name-only HEAD)
============================================================================ test session starts ============================================================================
platform linux -- Python 3.6.6, pytest-3.7.4, py-1.6.0, pluggy-0.7.1 -- /usr/bin/python3
cachedir: .pytest_cache
389-ds-base: 1.4.0.16-1.fc28
nss: 3.38.0-1.0.fc28
nspr: 4.19.0-1.fc28
openldap: 2.4.46-3.fc28
cyrus-sasl: 2.1.27-0.2rc7.fc28
FIPS: disabled
rootdir: /workspace/ds, inifile:
collected 153 items                                                                                                                                                         

dirsrvtests/tests/suites/basic/basic_test.py::test_basic_ops PASSED                                                                                                   [  0%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_import_export PASSED                                                                                         [  1%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_backup PASSED                                                                                                [  1%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_db2index PASSED                                                                                              [  2%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_acl PASSED                                                                                                   [  3%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_searches PASSED                                                                                              [  3%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_referrals PASSED                                                                                             [  4%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_systemctl PASSED                                                                                             [  5%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_ldapagent PASSED                                                                                             [  5%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_dse PASSED                                                                                                   [  6%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[namingContexts] PASSED                                                                            [  7%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[supportedLDAPVersion] PASSED                                                                      [  7%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[supportedControl] PASSED                                                                          [  8%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[supportedExtension] PASSED                                                                        [  9%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[supportedSASLMechanisms] PASSED                                                                   [  9%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[vendorName] PASSED                                                                                [ 10%]
dirsrvtests/tests/suites/basic/basic_test.py::test_def_rootdse_attr[vendorVersion] PASSED                                                                             [ 11%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[namingContexts] PASSED                                                                        [ 11%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[supportedLDAPVersion] PASSED                                                                  [ 12%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[supportedControl] PASSED                                                                      [ 13%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[supportedExtension] PASSED                                                                    [ 13%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[supportedSASLMechanisms] PASSED                                                               [ 14%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[vendorName] PASSED                                                                            [ 15%]
dirsrvtests/tests/suites/basic/basic_test.py::test_mod_def_rootdse_attr[vendorVersion] PASSED                                                                         [ 15%]
dirsrvtests/tests/suites/basic/basic_test.py::test_basic_anonymous_search PASSED                                                                                      [ 16%]
dirsrvtests/tests/suites/basic/basic_test.py::test_search_original_type PASSED                                                                                        [ 16%]
dirsrvtests/tests/suites/basic/basic_test.py::test_search_ou PASSED                                                                                                   [ 17%]
dirsrvtests/tests/suites/basic/basic_test.py::test_connection_buffer_size PASSED                                                                                      [ 18%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_supported_features PASSED                                                                        [ 18%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0] PASSED                                                      [ 19%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0-*] PASSED                                                    [ 20%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0-objectClass] PASSED                                          [ 20%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1] PASSED                                                       [ 21%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1-*] PASSED                                                     [ 22%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1-objectClass] PASSED                                           [ 22%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2] PASSED                           [ 23%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2-*] PASSED                         [ 24%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2-objectClass] PASSED               [ 24%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3] PASSED                            [ 25%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3-*] PASSED                          [ 26%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3-objectClass] PASSED                [ 26%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4] PASSED        [ 27%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4-*] PASSED      [ 28%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4-objectClass] PASSED [ 28%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5] PASSED         [ 29%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5-*] PASSED       [ 30%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5-objectClass] PASSED [ 30%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6] PASSED                                             [ 31%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6-*] PASSED                                           [ 32%]
dirsrvtests/tests/suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6-objectClass] PASSED                                 [ 32%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[6-5] PASSED                                                                         [ 33%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[5-5] PASSED                                                                         [ 33%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[5-25] PASSED                                                                        [ 34%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[50-200-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-idlistscanlimit-100-UNWILLING_TO_PERFORM] PASSED [ 35%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[5-15-cn=config-nsslapd-timelimit-20-UNAVAILABLE_CRITICAL_EXTENSION] PASSED      [ 35%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-sizelimit-20-SIZELIMIT_EXCEEDED] PASSED                 [ 36%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-pagedsizelimit-5-SIZELIMIT_EXCEEDED] PASSED             [ 37%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[5-50-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-lookthroughlimit-20-ADMINLIMIT_EXCEEDED] PASSED [ 37%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_sort_success PASSED                                                                         [ 38%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_abandon PASSED                                                                              [ 39%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_with_timelimit PASSED                                                                       [ 39%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[dns = "server.example.com"] PASSED                                               [ 40%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[ip = "172.17.0.4"] PASSED                                                        [ 41%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_multiple_paging PASSED                                                                      [ 41%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_invalid_cookie[1000] PASSED                                                                 [ 42%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_invalid_cookie[-1] PASSED                                                                   [ 43%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_abandon_with_zero_size PASSED                                                               [ 43%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_pagedsizelimit_success PASSED                                                               [ 44%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[5-15-PASS] PASSED                                                          [ 45%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[15-5-SIZELIMIT_EXCEEDED] PASSED                                            [ 45%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                                  [ 46%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values1-PASS] PASSED                                                 [ 47%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                             [ 47%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values1-PASS] PASSED                                            [ 48%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_ger_basic PASSED                                                                                   [ 49%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_multi_suffix_search PASSED                                                                         [ 49%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[None] PASSED                                                       [ 50%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[-1] PASSED                                                         [ 50%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[1000] PASSED                                                       [ 51%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[0] PASSED                                                          [ 52%]
dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[1] PASSED                                                          [ 52%]
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py::test_change_pwd[on-off-UNWILLING_TO_PERFORM] PASSED                                                    [ 53%]
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py::test_change_pwd[off-off-UNWILLING_TO_PERFORM] PASSED                                                   [ 54%]
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py::test_change_pwd[off-on-None] PASSED                                                                    [ 54%]
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py::test_change_pwd[on-on-None] PASSED                                                                     [ 55%]
dirsrvtests/tests/suites/password/pwdPolicy_attribute_test.py::test_pwd_min_age PASSED                                                                                [ 56%]
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py::test_entry_has_no_restrictions[off-off] PASSED                                                    [ 56%]
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py::test_entry_has_no_restrictions[on-off] PASSED                                                     [ 57%]
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py::test_entry_has_no_restrictions[off-on] PASSED                                                     [ 58%]
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py::test_entry_has_restrictions[cn=config] PASSED                                                     [ 58%]
dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py::test_entry_has_restrictions[cn="cn=nsPwPolicyEntry,ou=People,dc=example,dc=com",cn=nsPwPolicyContainer,ou=People,dc=example,dc=com] PASSED [ 59%]
dirsrvtests/tests/suites/password/pwdPolicy_syntax_test.py::test_basic PASSED                                                                                         [ 60%]
dirsrvtests/tests/suites/password/regression_test.py::test_pwp_local_unlock PASSED                                                                                    [ 60%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[CNpwtest1] PASSED                                                                      [ 61%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[SNpwtest1] PASSED                                                                      [ 62%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[UIDpwtest1] PASSED                                                                     [ 62%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[MAILpwtest1@redhat.com] PASSED                                                         [ 63%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[GNpwtest1] PASSED                                                                      [ 64%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[CNpwtest1ZZZZ] PASSED                                                                  [ 64%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZZZZCNpwtest1] PASSED                                                                 [ 65%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZCNpwtest1] PASSED                                                                     [ 66%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[CNpwtest1Z] PASSED                                                                     [ 66%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZCNpwtest1Z] PASSED                                                                    [ 67%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZCNpwtest1] PASSED                                                                    [ 67%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[CNpwtest1ZZ] PASSED                                                                    [ 68%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZCNpwtest1ZZ] PASSED                                                                  [ 69%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZZCNpwtest1] PASSED                                                                   [ 69%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[CNpwtest1ZZZ] PASSED                                                                   [ 70%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZZCNpwtest1ZZZ] PASSED                                                                [ 71%]
dirsrvtests/tests/suites/password/regression_test.py::test_trivial_passw_check[ZZZZZZCNpwtest1ZZZZZZZZ] PASSED                                                        [ 71%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[CNpwtest1] PASSED                                                                          [ 72%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[SNpwtest1] PASSED                                                                          [ 73%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[UIDpwtest1] PASSED                                                                         [ 73%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[MAILpwtest1@redhat.com] PASSED                                                             [ 74%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[GNpwtest1] PASSED                                                                          [ 75%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[CNpwtest1ZZZZ] PASSED                                                                      [ 75%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZZZZCNpwtest1] PASSED                                                                     [ 76%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZCNpwtest1] PASSED                                                                         [ 77%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[CNpwtest1Z] PASSED                                                                         [ 77%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZCNpwtest1Z] PASSED                                                                        [ 78%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZCNpwtest1] PASSED                                                                        [ 79%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[CNpwtest1ZZ] PASSED                                                                        [ 79%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZCNpwtest1ZZ] PASSED                                                                      [ 80%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZZCNpwtest1] PASSED                                                                       [ 81%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[CNpwtest1ZZZ] PASSED                                                                       [ 81%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZZCNpwtest1ZZZ] PASSED                                                                    [ 82%]
dirsrvtests/tests/suites/password/regression_test.py::test_global_vs_local[ZZZZZZCNpwtest1ZZZZZZZZ] PASSED                                                            [ 83%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_add_entry PASSED                                                                                        [ 83%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modify_entry PASSED                                                                                     [ 84%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_delete_entry PASSED                                                                                     [ 84%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_entry[0] PASSED                                                                                  [ 85%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_entry[1] PASSED                                                                                  [ 86%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modrdn_after_pause PASSED                                                                               [ 86%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_modify_stripattrs PASSED                                                                                [ 87%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_new_suffix PASSED                                                                                       [ 88%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_many_attrs PASSED                                                                                       [ 88%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_double_delete PASSED                                                                                    [ 89%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_password_repl_error PASSED                                                                              [ 90%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_invalid_agmt PASSED                                                                                     [ 90%]
dirsrvtests/tests/suites/replication/acceptance_test.py::test_warining_for_invalid_replica PASSED                                                                     [ 91%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_add_modrdn PASSED                                                                 [ 92%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_complex_add_modify_modrdn_delete PASSED                                           [ 92%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_memberof_groups xfail                                                             [ 93%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_managed_entries xfail                                                             [ 94%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_nested_entries_with_children xfail                                                [ 94%]
dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestThreeMasters::test_nested_entries xfail                                                            [ 95%]
dirsrvtests/tests/suites/replication/regression_test.py::test_double_delete PASSED                                                                                    [ 96%]
dirsrvtests/tests/suites/replication/regression_test.py::test_repl_modrdn PASSED                                                                                      [ 96%]
dirsrvtests/tests/suites/replication/regression_test.py::test_password_repl_error PASSED                                                                              [ 97%]
dirsrvtests/tests/suites/replication/regression_test.py::test_invalid_agmt PASSED                                                                                     [ 98%]
dirsrvtests/tests/suites/replication/regression_test.py::test_fetch_bindDnGroup PASSED                                                                                [ 98%]
dirsrvtests/tests/suites/replication/regression_test.py::test_cleanallruv_repl PASSED                                                                                 [ 99%]
dirsrvtests/tests/tickets/ticket48808_test.py::test_ticket48808 PASSED                                                                                                [100%]

================================================================== 149 passed, 4 xfailed in 992.40 seconds ================================================================== 

Ack from me. @spichugi please take a look and help merge this change. Thanks.

Okay, please, rebase and we can merge

rebased onto 8857b15

5 years ago

Pull-Request has been merged by spichugi

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/2993

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago