platform-core/tests/integration/rbac
ValueOn AG 4a60086c80
Some checks failed
Deploy Plattform-Core (Int) / test (push) Failing after 15s
Deploy Plattform-Core (Int) / deploy (push) Has been skipped
cp adapted to 2026 poweron
2026-06-09 09:53:31 +02:00
..
__init__.py cp adapted to 2026 poweron 2026-06-09 09:53:31 +02:00
README.md refactored uam to rbac 2025-12-07 13:48:39 +01:00
test_platform_admin_flag.py cp adapted to 2026 poweron 2026-06-09 09:53:31 +02:00
test_rbac_database.py cp adapted to 2026 poweron 2026-06-09 09:53:31 +02:00

RBAC Integration Tests

Integration tests for the Role-Based Access Control (RBAC) system.

Test Files

test_rbac_database.py

Tests RBAC database filtering:

  • WHERE clause building for ALL access level
  • WHERE clause building for MY access level
  • WHERE clause building for GROUP access level
  • WHERE clause building for NONE access level
  • Special handling for UserInDB table
  • Special handling for UserConnection table

test_rbac_migration.py

Tests UAM to RBAC migration:

  • User privilege to roleLabels conversion
  • Skipping users with existing roleLabels
  • Dry run mode
  • Migration validation
  • Validation failure scenarios

Running Tests

# Run all RBAC integration tests
pytest tests/integration/rbac/

# Run specific test file
pytest tests/integration/rbac/test_rbac_database.py

# Run with verbose output
pytest tests/integration/rbac/ -v

Test Coverage

  • Database query filtering with RBAC
  • SQL WHERE clause generation
  • Migration script functionality
  • Data validation after migration