Fundamental test coverage of the init_vgrid_script_add_rem helper in vgrid module#428
Draft
jonasbardino wants to merge 2 commits intonextfrom
Draft
Fundamental test coverage of the init_vgrid_script_add_rem helper in vgrid module#428jonasbardino wants to merge 2 commits intonextfrom
jonasbardino wants to merge 2 commits intonextfrom
Conversation
1. Valid parameters as owner 2. Non-owner attempting modification 3. Invalid vgrid name format 4. Missing required subject_type parameter 5. Invalid subject_type value 6. Special case allowing members to remove themselves The tests verify proper validation of: - VGrid name security checks - Owner privileges - Parameter completeness - Subject type validation - Special member self-removal case There are some TODOs to look into about what I'd consider odd behaviour of the `_provision_test_user` helper apparently hard-coding only a fixed test user in the user db despite actually provisioning user dirs etc for the provided DN. This leads to the is_user helper failing to identify anything but the hard-coded test user as a valid user even after provisioning with the helper.
…cover especially the recently added `from_remove=True` case of #427 The tests ensure that: - Non-owners cannot remove owners (proper permission check) - Unknown resources can be added (from_remove=False allows pending ones) - Unknown resources can be removed (from_remove=True allows non-existing) - Unknown users cannot be added (from_remove=False refuses non-existing) - Unknown users can be removed (from_remove=True allows non-existing) - Non-trigger-owners cannot remove triggers (proper trigger ownership check) - Trigger owners can remove their triggers (valid removal)
Contributor
Author
|
I'm unsure if the TODO mentioned in the description here is a bug in _provision_test_user or me not using the helper in the intended way so I've called for your early review before I finish the PR @albu-diku . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend
vgridunit tests to cover theinit_vgrid_script_add_remhelper as follow-up to #427 :from_remove=True)There are some TODOs to look into about what I'd consider odd behaviour of the
_provision_test_userhelper apparently hard-coding only a fixed test user in the user db despite actually provisioning user dirs etc for the provided user DN. This leads to theis_userhelper failing to identify anything but the hard-coded test user as a valid user even after provisioning with the helper. Asinit_vgrid_script_add_remuses thatis_userhelper it trickles down into these tests.