Hello, after updating the framework to 9.1.0
Unit tests are started to fail in our custom SaaS module due missing service registration.
Beside that how you guys managed to release commercial module with failing unit tests :)
Can you guys able to check and fix module accordingly ?
As a workaround;
Base on error message, I temporarily added AbpSettingManagementEntityFrameworkCoreModule
to the EntityFrameworkCore
layer.
This automatically registered missing services.
For the tests;
I extended existing CreateDatabaseAndGetConnection()
method with new SettingManagementDbContext
private static SqliteConnection CreateDatabaseAndGetConnection()
{
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
new SaasDbContext(
new DbContextOptionsBuilder().UseSqlite(connection).Options
).GetService().CreateTables();
new SettingManagementDbContext(
new DbContextOptionsBuilder().UseSqlite(connection).Options
).GetService().CreateTables();
return connection;
}
1 Answer(s)
-
0
Hi, I've checked and reproduced the problem. Indeed the specified tests are failing, this is weird to see that because we have a testing pipeline that runs before releasing modules. I'll investigate this situation.
Btw, your solution to the problem is correct, we will add the same code to the module class.
Thanks for reporting.