mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Added before migration hook, this can be used to insert "old" data into test Db
so data migration could be tested.
This commit is contained in:
committed by
Mark McDowall
parent
37a1398338
commit
c7ed76f6d3
@@ -89,7 +89,6 @@ namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
WithTempAsAppPath();
|
||||
|
||||
|
||||
Mocker.SetConstant<IAnnouncer>(Mocker.Resolve<MigrationLogger>());
|
||||
Mocker.SetConstant<IConnectionStringFactory>(Mocker.Resolve<ConnectionStringFactory>());
|
||||
Mocker.SetConstant<IMigrationController>(Mocker.Resolve<MigrationController>());
|
||||
@@ -97,9 +96,9 @@ namespace NzbDrone.Core.Test.Framework
|
||||
MapRepository.Instance.EnableTraceLogging = true;
|
||||
|
||||
var factory = Mocker.Resolve<DbFactory>();
|
||||
var _database = factory.Create(MigrationType);
|
||||
_db = new TestDatabase(_database);
|
||||
Mocker.SetConstant(_database);
|
||||
var database = factory.Create(MigrationType);
|
||||
_db = new TestDatabase(database);
|
||||
Mocker.SetConstant(database);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
|
||||
Reference in New Issue
Block a user