Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LCORE-887: fixed pyright issues in auth tests#1089

Merged
tisnik merged 3 commits into
lightspeed-core:mainfrom
tisnik:lcore-887-fixed-pyright-issues-in-auth-tests
Feb 2, 2026
Merged

LCORE-887: fixed pyright issues in auth tests#1089
tisnik merged 3 commits into
lightspeed-core:mainfrom
tisnik:lcore-887-fixed-pyright-issues-in-auth-tests

Conversation

@tisnik

@tisnik tisnik commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-887: fixed pyright issues in auth tests

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-887

Summary by CodeRabbit

  • New Features
    • Expanded authorization configuration options with additional scope and negation support for role-based access control rules.

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Tests updated to reflect new public parameters in configuration and model classes. AzureEntraIdConfiguration now requires a scope parameter, and JwtRoleRule data structure now includes a negate boolean field. Test fixtures and instantiations updated accordingly.

Changes

Cohort / File(s) Summary
Azure Configuration Tests
tests/unit/authorization/test_azure_token_manager.py
Updated test to pass new scope parameter to AzureEntraIdConfiguration constructor with value "https://cognitiveservices.azure.com/.default".
JWT Role Rule Tests
tests/unit/authorization/test_middleware.py, tests/unit/authorization/test_resolvers.py
Updated all JwtRoleRule instantiations to include new negate=False parameter. Additionally updated GenericAccessResolver.check_access call to pass set instead of frozenset for roles parameter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: fixing pyright issues in authentication tests, which aligns with the file changes across test_azure_token_manager.py, test_middleware.py, and test_resolvers.py.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tisnik tisnik merged commit c02b6a6 into lightspeed-core:main Feb 2, 2026
19 of 22 checks passed
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.

1 participant