Skip to content

Conversation

@darshanasbg
Copy link
Member

Purpose

$subject

Copilot AI review requested due to automatic review settings November 9, 2025 19:37
@darshanasbg darshanasbg added the skip-changelog Skip generating changelog for a particular PR label Nov 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive test coverage for the user and organization unit management packages. The changes include new test files for store and handler layers in the user package, and store and service layers in the ou package. The production code has been refactored to enable testability through dependency injection while maintaining the existing API contracts.

Key changes:

  • Added extensive test suites for user store, handler, and service layers
  • Added comprehensive test coverage for ou store and service layers
  • Refactored store implementations to use dependency injection for database providers
  • Added testability hooks in service layer for resource fetching
  • Added mock configuration for the ou package

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/internal/user/store_test.go Adds comprehensive store layer tests for user management operations
backend/internal/user/handler_test.go Adds extensive handler layer tests with test suite pattern
backend/internal/user/service_test.go Renames test functions to follow naming conventions
backend/internal/user/store.go Refactors store to use dependency injection for testability
backend/internal/ou/store_test.go Adds comprehensive store layer tests for organization units
backend/internal/ou/service_test.go Adds extensive service layer tests with helper functions
backend/internal/ou/service.go Adds testability hooks for resource fetching
backend/internal/ou/organizationUnitStoreInterface_mock_test.go Generated mock file for store interface
backend/.mockery.private.yml Adds mock configuration for ou package

Copilot AI review requested due to automatic review settings November 9, 2025 20:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.03%. Comparing base (8d39adf) to head (725d7f0).
⚠️ Report is 46 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #713      +/-   ##
==========================================
+ Coverage   78.41%   80.03%   +1.61%     
==========================================
  Files         239      239              
  Lines       20147    20149       +2     
  Branches      334      334              
==========================================
+ Hits        15799    16126     +327     
+ Misses       3206     2999     -207     
+ Partials     1142     1024     -118     
Flag Coverage Δ
backend-combined-postgres 55.90% <100.00%> (+0.01%) ⬆️
backend-combined-sqlite 55.90% <100.00%> (+0.01%) ⬆️
backend-integration-postgres 55.90% <100.00%> (+0.01%) ⬆️
backend-integration-sqlite 55.90% <100.00%> (+0.01%) ⬆️
backend-unit 57.64% <85.00%> (+4.00%) ⬆️
frontend-apps-develop-unit 57.64% <85.00%> (+4.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings November 9, 2025 20:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings November 10, 2025 04:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

backend/internal/user/service_test.go:1

  • The test case 'removes credential fields' in TestExtractCredentials is commented out. This test validates important credential extraction behavior and should be uncommented to ensure proper test coverage.
/*


oupkg "github.com/asgardeo/thunder/internal/ou"
"github.com/asgardeo/thunder/internal/system/error/serviceerror"
// "github.com/asgardeo/thunder/internal/system/hash"
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Commented import that appears to be leftover from development. This should either be removed entirely or uncommented if needed by the commented-out test cases.

Suggested change
// "github.com/asgardeo/thunder/internal/system/hash"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip generating changelog for a particular PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant