Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ldap group/membership tests #438

Merged

Conversation

arif-ali
Copy link
Contributor

@arif-ali arif-ali commented Oct 7, 2020

Adds a test to check for groups that are coming from LDAP.

Adds a test to ensure that openstack is able to check the membership
of a user in the group.

Signed-off-by: Arif Ali arif.ali@canonical.com

@arif-ali arif-ali changed the title Add ldap group/membership tests [WIP] Add ldap group/membership tests Oct 8, 2020
@arif-ali
Copy link
Contributor Author

arif-ali commented Oct 8, 2020

This passed with func-smoke for keystone-ldap charm, but now running full func tests, we get the following error

2020-10-08 08:40:25 [INFO] keystoneauth1.exceptions.http.Forbidden: You are not authorized to perform the requested action: identity:list_groups_for_user (HTTP 403) (Request-ID: req-f9e105d0-194f-4b1e-b91a-edb82d1e0540)

This is from the test test_102_keystone_ldap_group_membership, maybe requires extra policy changes

@arif-ali arif-ali marked this pull request as draft October 8, 2020 09:29
@arif-ali arif-ali marked this pull request as ready for review November 15, 2020 00:36
@arif-ali arif-ali changed the title [WIP] Add ldap group/membership tests Add ldap group/membership tests Nov 15, 2020
@codecov-io
Copy link

codecov-io commented Nov 15, 2020

Codecov Report

Merging #438 (fa9eb85) into master (44e6280) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
- Coverage   18.31%   18.22%   -0.10%     
==========================================
  Files         158      158              
  Lines        9094     9140      +46     
==========================================
  Hits         1666     1666              
- Misses       7428     7474      +46     
Impacted Files Coverage Δ
zaza/openstack/charm_tests/keystone/tests.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44e6280...fa9eb85. Read the comment docs.

@arif-ali
Copy link
Contributor Author

This will conflict and add on to of #458

@arif-ali
Copy link
Contributor Author

func-smoke: https://paste.ubuntu.com/p/HwdQjqdmc3/

after making the following modifications

diff --git a/src/test-requirements.txt b/src/test-requirements.txt
index d3c9be8..3bd6c04 100644
--- a/src/test-requirements.txt
+++ b/src/test-requirements.txt
@@ -5,4 +5,4 @@
 #
 # Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
 git+https://github.com/openstack-charmers/zaza.git#egg=zaza
-git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
+git+https://github.com/arif-ali/zaza-openstack-tests.git@ldap-groups-membership-tests#egg=zaza.openstack

@arif-ali arif-ali marked this pull request as draft November 24, 2020 07:44
@arif-ali arif-ali marked this pull request as ready for review November 24, 2020 10:02
Copy link
Contributor

@lourot lourot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general, just a few nitpicks, thanks!

zaza/openstack/charm_tests/keystone/tests.py Outdated Show resolved Hide resolved
zaza/openstack/charm_tests/keystone/tests.py Outdated Show resolved Hide resolved
zaza/openstack/charm_tests/keystone/tests.py Outdated Show resolved Hide resolved
zaza/openstack/charm_tests/keystone/tests.py Outdated Show resolved Hide resolved
Adds a test to check for groups that are coming from LDAP.

Adds a test to ensure that openstack is able to check the membership
of a user in the group.

Signed-off-by: Arif Ali <arif.ali@canonical.com>
@lourot lourot merged commit 83721ee into openstack-charmers:master Nov 27, 2020
openstack-mirroring pushed a commit to openstack/charm-keystone-ldap that referenced this pull request Nov 27, 2020
Adding the the group_name_attribute, as this was missed in the previous
review.

func-test-pr: openstack-charmers/zaza-openstack-tests#438

Depends-On: https://review.opendev.org/c/openstack/charm-keystone-ldap/+/748364
Change-Id: I9fe650704606317b337978ea9d8fec3a09c2b50f
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Nov 27, 2020
* Update charm-keystone-ldap from branch 'master'
  to ce279129db48d675797a13695c2d9b5eb0be507e
  - Add group_name_attribute as a config attribute
    
    Adding the the group_name_attribute, as this was missed in the previous
    review.
    
    func-test-pr: openstack-charmers/zaza-openstack-tests#438
    
    Depends-On: https://review.opendev.org/c/openstack/charm-keystone-ldap/+/748364
    Change-Id: I9fe650704606317b337978ea9d8fec3a09c2b50f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants