mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
Running Integration Tests against Postgres Database (#838)
* Allow configuring postgres with environment variables (cherry picked from commit 8439df78fea25656a9a1275d2a2fe3f0df0528c7) * Fix process provider when environment variables alread exist [common] (cherry picked from commit 66e5b4025974e081c1406f01a860b1ac52949c22) * First bash at running integration tests on postgres (cherry picked from commit f950e80c7e4f9b088ec6a149386160eab83b61c3) * Postgres integration tests running as part of the build pipeline (cherry picked from commit 9ca8616f5098778e9b5e6ce09d2aa11224018fab) * Fixed: Register PostgresOptions when running in utility mode * fixup! * fixup! * fixup! * fixup! * fixup! Co-authored-by: ta264 <ta264@users.noreply.github.com> Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ namespace NzbDrone.Core.Test.Framework
|
||||
where T : ModelBase, new();
|
||||
IDirectDataMapper GetDirectDataMapper();
|
||||
IDbConnection OpenConnection();
|
||||
DatabaseType DatabaseType { get; }
|
||||
}
|
||||
|
||||
public class TestDatabase : ITestDatabase
|
||||
@@ -30,6 +31,8 @@ namespace NzbDrone.Core.Test.Framework
|
||||
private readonly IDatabase _dbConnection;
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
|
||||
public DatabaseType DatabaseType => _dbConnection.DatabaseType;
|
||||
|
||||
public TestDatabase(IDatabase dbConnection)
|
||||
{
|
||||
_eventAggregator = new Mock<IEventAggregator>().Object;
|
||||
|
||||
Reference in New Issue
Block a user