#50708 Issue: 48055 - CI test - automember_plugin(part2)
Closed by spichugi. Opened by aborah.
aborah/389-ds-base auto1_and_admin_part2  into  master

Download 50708.patch

Bug Description: CI test - automember_plugin(part2)

Relates: https://pagure.io/389-ds-base/issue/48055

Author: aborah

Reviewed by: ???

I think most of the tests from this PR can be squashed (using parametrization).
Also, please, rebase with the current master.

rebased onto 75ddc4f820d2886cef64cbed0e21590caa79b1d6

I think most of the tests from this PR can be squashed (using parametrization).
Also, please, rebase with the current master.

Done, now this test script is parametrized

2 new commits added

  • Fixing Simon's comments.
  • Issue: 48055 - CI test - automember_plugin(part2)

2 new commits added

  • Fixing Simon's comments.
  • Issue: 48055 - CI test - automember_plugin(part2)

This line is hard to read.
You can use a dedicated function to check if the attribute is present.

Why is it numbered in such a not ordered way? Is there any reason?

You may delete something else here. Why not delete user1 and user2 directly?

Please, run pylint and fix the issues.

Why is it numbered in such a not ordered way? Is there any reason?

No reason , i can put it any order . while i was making these test cases parameterized , i was coping these test cases one by one , thats why it came this order

1 new commit added

  • Fixing Simon's comments 2

This line is hard to read.
You can use a dedicated function to check if the attribute is present.

Done

You may delete something else here. Why not delete user1 and user2 directly?

Done

Please, run pylint and fix the issues.

Done

3 new commits added

  • Fixing Simon's comments 2
  • Fixing Simon's comments.
  • Issue: 48055 - CI test - automember_plugin(part2)

You still haven't fixed pylint import issues.

You still haven't fixed pylint import issues.

This is what i got from pylint . There is one import issue shown by pylint which is not correct as topo is used every where on the script

[root@localhost Documents]# pylint basic_test.py
*** Module basic_test
basic_test.py:30:0: C0103: Constant name "pytestmark" doesn't conform to UPPER_CASE naming style (invalid-name)
basic_test.py:43:21: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:74:13: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:74:0: R0913: Too many arguments (6/5) (too-many-arguments)
basic_test.py:99:17: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:106:14: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:115:20: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:122:22: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:164:20: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:177:11: E1101: Module 'ldap' has no 'NO_SUCH_ATTRIBUTE' member (no-member)
basic_test.py:186:24: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:305:29: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:323:28: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:342:55: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:388:57: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:408:73: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:439:60: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:466:72: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:496:63: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:546:47: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:567:23: E1101: Module 'ldap' has no 'UNWILLING_TO_PERFORM' member (no-member)
basic_test.py:575:50: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:602:23: E1101: Module 'ldap' has no 'UNWILLING_TO_PERFORM' member (no-member)
basic_test.py:617:8: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:646:56: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:646:0: R0913: Too many arguments (9/5) (too-many-arguments)
basic_test.py:685:61: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:685:0: R0913: Too many arguments (9/5) (too-many-arguments)
basic_test.py:724:63: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:724:0: R0913: Too many arguments (8/5) (too-many-arguments)
basic_test.py:758:39: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:758:0: R0913: Too many arguments (8/5) (too-many-arguments)
basic_test.py:787:64: W0621: Redefining name 'topo' from outer scope (line 16) (redefined-outer-name)
basic_test.py:805:23: E1101: Module 'ldap' has no 'UNWILLING_TO_PERFORM' member (no-member)
basic_test.py:817:23: E1101: Module 'ldap' has no 'ALREADY_EXISTS' member (no-member)
basic_test.py:16:0: W0611: Unused topology_m1 imported from lib389.topologies as topo (unused-import)


Your code has been rated at 7.85/10 (previous run: 7.90/10, -0.05)

Strange, I also have these errors in my pylint report:

C: 15, 0: third party import "import pytest" should be placed before "import ldap" (wrong-import-order)
C: 16, 0: third party import "from lib389.topologies import topology_m1 as topo" should be placed before "import ldap" (wrong-import-order)
C: 17, 0: third party import "from lib389.idm.organizationalunit import OrganizationalUnits" should be placed before "import ldap" (wrong-import-order)
C: 18, 0: third party import "from lib389.idm.domain import Domain" should be placed before "import ldap" (wrong-import-order)
C: 19, 0: third party import "from lib389.idm.posixgroup import PosixGroups" should be placed before "import ldap" (wrong-import-order)
C: 20, 0: third party import "from lib389.plugins import AutoMembershipPlugin, AutoMembershipDefinitions, MemberOfPlugin, AutoMembershipRegexRules, AutoMembershipDefinition" should be placed before "import ldap" (wrong-import-order)
C: 22, 0: third party import "from lib389.backend import Backends" should be placed before "import ldap" (wrong-import-order)
C: 23, 0: third party import "from lib389.config import Config" should be placed before "import ldap" (wrong-import-order)
C: 24, 0: third party import "from lib389._constants import DEFAULT_SUFFIX" should be placed before "import ldap" (wrong-import-order)
C: 25, 0: third party import "from lib389.idm.user import UserAccounts" should be placed before "import ldap" (wrong-import-order)
C: 26, 0: third party import "from lib389.idm.group import Groups, Group, UniqueGroup, nsAdminGroups, nsAdminGroup" should be placed before "import ldap" (wrong-import-order)
C: 27, 0: third party import "from lib389.utils import ds_is_older" should be placed before "import ldap" (wrong-import-order)

Could you please fix them? It is important to follow the import order because the wrong import order could lead to import loops.

1 new commit added

  • Fixing Simon's comments 3

Strange, I also have these errors in my pylint report:
C: 15, 0: third party import "import pytest" should be placed before "import ldap" (wrong-import-order)
C: 16, 0: third party import "from lib389.topologies import topology_m1 as topo" should be placed before "import ldap" (wrong-import-order)
C: 17, 0: third party import "from lib389.idm.organizationalunit import OrganizationalUnits" should be placed before "import ldap" (wrong-import-order)
C: 18, 0: third party import "from lib389.idm.domain import Domain" should be placed before "import ldap" (wrong-import-order)
C: 19, 0: third party import "from lib389.idm.posixgroup import PosixGroups" should be placed before "import ldap" (wrong-import-order)
C: 20, 0: third party import "from lib389.plugins import AutoMembershipPlugin, AutoMembershipDefinitions, MemberOfPlugin, AutoMembershipRegexRules, AutoMembershipDefinition" should be placed before "import ldap" (wrong-import-order)
C: 22, 0: third party import "from lib389.backend import Backends" should be placed before "import ldap" (wrong-import-order)
C: 23, 0: third party import "from lib389.config import Config" should be placed before "import ldap" (wrong-import-order)
C: 24, 0: third party import "from lib389._constants import DEFAULT_SUFFIX" should be placed before "import ldap" (wrong-import-order)
C: 25, 0: third party import "from lib389.idm.user import UserAccounts" should be placed before "import ldap" (wrong-import-order)
C: 26, 0: third party import "from lib389.idm.group import Groups, Group, UniqueGroup, nsAdminGroups, nsAdminGroup" should be placed before "import ldap" (wrong-import-order)
C: 27, 0: third party import "from lib389.utils import ds_is_older" should be placed before "import ldap" (wrong-import-order)

Could you please fix them? It is important to follow the import order because the wrong import order could lead to import loops.

Done

There is no need to change the copyright because the file was created in 2019 and from that moment the copyright works.

The rest looks good to me

rebased onto c674434d14bb1d09ce79f825f306248e8ee50361

rebased onto 440b856adb5b347dacd425690a666b651077bb58

rebased onto 24ffba3cb601e32384a9e706316ebb58b43aba83

rebased onto e7e2abf602e2aa7b2deb18bed2786ac49fae9b3e

rebased onto 7cb0a1fab48060d8b4297cd9ec749e7a95c61607

Pull-Request has been merged by vashirov

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/3763

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

Metadata