mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds integration tests for EventualConsistencyMiddleware transaction atomicity
This commit is contained in:
1 parent
a07ecf449a
commit
d516e94346
9 files changed
+799
No files matched your search
+16
@@ -84,6 +84,7 @@ public class LuminaApiFactory : WebApplicationFactory<Program>, IDisposable
|
||||
{
|
||||
options.UseSqlite(_sharedInMemoryConnectionString);
|
||||
options.AddInterceptors(serviceProvider.GetRequiredService<UpdateAuditableEntitiesInterceptor>());
|
||||
ConfigureDbContextOptions(serviceProvider, options);
|
||||
});
|
||||
// Configure JWT authentication for testing.
|
||||
services.PostConfigure<JwtBearerOptions>(JwtBearerDefaults.AuthenticationScheme, options =>
|
||||
@@ -110,6 +111,21 @@ public class LuminaApiFactory : WebApplicationFactory<Program>, IDisposable
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures additional options of the database context used by the tests.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The hook is invoked every time the options of a database context are built, including once for the throwaway provider that migrates the
|
||||
/// database while the host is configured and once for the final provider of the host. Derived factories that resolve test services from the
|
||||
/// provided <paramref name="serviceProvider"/> must register those services before the shared factory configures the database, and must call
|
||||
/// this base implementation so that options added here are never silently skipped.
|
||||
/// </remarks>
|
||||
/// <param name="serviceProvider">The service provider used to resolve the options of the database context.</param>
|
||||
/// <param name="options">The options builder of the database context being configured.</param>
|
||||
protected virtual void ConfigureDbContextOptions(IServiceProvider serviceProvider, DbContextOptionsBuilder options)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the in-memory SQLite database to its original state.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user