Skip to content

Add unit tests for shared user covering shared and separate database#25319

Merged
ismcagdas merged 5 commits intorel-10.2from
maliming/add-shared-user-tests
Apr 27, 2026
Merged

Add unit tests for shared user covering shared and separate database#25319
ismcagdas merged 5 commits intorel-10.2from
maliming/add-shared-user-tests

Conversation

@maliming
Copy link
Copy Markdown
Member

Adds abstract test suites in TestBase and concrete EF/Mongo subclasses for shared user (IdentityUserManager.FindSharedUserBy*Async) under both shared-database and separate-database multi-tenancy topologies.

Copilot AI review requested due to automatic review settings April 25, 2026 06:04
Copy link
Copy Markdown
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

Adds reusable unit test suites to validate IdentityUserManager.FindSharedUserBy*Async behavior for shared-user mode across both shared database and separate database multi-tenancy topologies, with concrete EF Core and MongoDB runners.

Changes:

  • Introduces abstract shared-user test suites in Volo.Abp.Identity.TestBase for shared DB and separate DB topologies.
  • Adds concrete EF Core and MongoDB test classes/modules to execute the suites on each backend/topology.
  • Removes the older inlined shared-user test class from IdentityUserManager_Tests.cs in favor of the new shared suites.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserManager_SharedUser_Tests.cs New abstract suite covering shared-user resolution (email/name/login/passkey/id) in shared-db mode.
modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserManager_SharedUser_SeparateDatabase_Tests.cs New abstract suite verifying separate-database isolation semantics under shared-user mode.
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/IdentityUserManager_SharedUser_Tests.cs MongoDB concrete runner for shared-db shared-user suite.
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/IdentityUserManager_SharedUser_SeparateDatabase_Tests.cs MongoDB concrete runner for separate-db isolation suite.
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentitySharedUserSeparateDbMongoDbTestModule.cs MongoDB test module configuring two predefined tenants with separate physical databases.
modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentitySharedUserSeparateDbEntityFrameworkCoreTestModule.cs EF Core test module configuring host + two tenants with separate in-memory SQLite databases.
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs Removes the previous dedicated shared-user test class now covered by the new suites.
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_SharedUser_Tests.cs EF-based concrete runner for shared-db shared-user suite.
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_SharedUser_SeparateDatabase_Tests.cs EF-based concrete runner for separate-db isolation suite.

Copy link
Copy Markdown
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 9 out of 9 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown
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 9 out of 9 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated no new comments.

@maliming maliming requested a review from ismcagdas April 27, 2026 00:35
@maliming maliming added this to the 10.2-patch-final milestone Apr 27, 2026
@ismcagdas ismcagdas merged commit 3541994 into rel-10.2 Apr 27, 2026
7 checks passed
@ismcagdas ismcagdas deleted the maliming/add-shared-user-tests branch April 27, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants