RANGER-4897: Extended the test coverage for XUserRest & RoleRest apis endpoints - #1140
Merged
Merged
Conversation
krishnamuttevi
marked this pull request as ready for review
August 6, 2026 07:19
pradeepagrawal8184
self-requested a review
August 6, 2026 11:56
pradeepagrawal8184
approved these changes
Aug 6, 2026
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.
Extends the Ranger functional test framework with a generic, suite-driven run-tests.sh runner and adds Pytest coverage for XUserREST and RoleREST Admin APIs.
Refactored run-tests.sh into a reusable orchestration script that any functional test suite can plug into:
Suite registry — ALL_TEST_SUITES lists available Pytest folders; new suites are added by dropping a directory and updating the array
Suite classification — separates test-only suites (rolerest, xuserrest, servicerest) from Docker-backed suites (hdfs, kms) so archives and compose files are started only when needed
Interactive and CLI modes — prompts for DB type and suites, or accepts
Conditional Docker setup — builds Ranger, brings up the base Admin stack (admin, DB, ZK, Solr, usersync, tagsync, KMS), and optionally adds HDFS/Hadoop compose when requested
Environment controls —
CLEAN_CONTAINERS=1for full clean build;RUN_TESTS=0for infrastructure-only runsGeneric test execution — loops over requested suites, runs pytest on each existing directory, and generates
report_<suite>.htmlper suitePytest suite for Ranger Admin XUserRest APIs:
test_user.py — user CRUD, role assignments, external users
test_secure_user.py — secure user CRUD and RBAC
test_groups.py — group and group-user management
test_permission.py — module permissions
test_ugsync.py — user/group sync (LDAP, UNIX, FILE)
test_utility_fun.py — lookup, auth sessions, userstore download
Includes shared conftest.py, utility/utils.py, and readme.md.
Pytest suite for Ranger Admin RoleRest APIs:
test_role_management.py — role CRUD, lookup, service-admin access paths
test_role_utility_fun.py — export/import, secure download, membership, grant/revoke
Includes role-specific utilities, fixtures, and readme.md.
Other changes
pytest.ini — adds xuserrest, rolerest, and HTTP method markers
functional-tests/readme.md — documents suites, env vars, usage, and reports