mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Make postgres integration tests actually use postgres
This commit is contained in:
@@ -14,11 +14,11 @@ namespace NzbDrone.Core.Datastore
|
|||||||
public static PostgresOptions GetOptions()
|
public static PostgresOptions GetOptions()
|
||||||
{
|
{
|
||||||
var config = new ConfigurationBuilder()
|
var config = new ConfigurationBuilder()
|
||||||
.AddEnvironmentVariables("Radarr__")
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var postgresOptions = new PostgresOptions();
|
var postgresOptions = new PostgresOptions();
|
||||||
config.GetSection("Postgres").Bind(postgresOptions);
|
config.GetSection("Radarr:Postgres").Bind(postgresOptions);
|
||||||
|
|
||||||
return postgresOptions;
|
return postgresOptions;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ using System.Security.Cryptography.X509Certificates;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using DryIoc;
|
using DryIoc;
|
||||||
using DryIoc.Microsoft.DependencyInjection;
|
using DryIoc.Microsoft.DependencyInjection;
|
||||||
using FluentMigrator.Runner.Processors.Postgres;
|
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@@ -17,7 +15,6 @@ using Microsoft.Extensions.Hosting;
|
|||||||
using Microsoft.Extensions.Hosting.WindowsServices;
|
using Microsoft.Extensions.Hosting.WindowsServices;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Composition.Extensions;
|
using NzbDrone.Common.Composition.Extensions;
|
||||||
using NzbDrone.Common.Disk;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Exceptions;
|
using NzbDrone.Common.Exceptions;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
@@ -135,7 +132,7 @@ namespace Radarr.Host
|
|||||||
})
|
})
|
||||||
.ConfigureServices(services =>
|
.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
services.Configure<PostgresOptions>(config.GetSection("Postgres"));
|
services.Configure<PostgresOptions>(config.GetSection("Radarr:Postgres"));
|
||||||
})
|
})
|
||||||
.ConfigureWebHost(builder =>
|
.ConfigureWebHost(builder =>
|
||||||
{
|
{
|
||||||
@@ -207,7 +204,7 @@ namespace Radarr.Host
|
|||||||
return new ConfigurationBuilder()
|
return new ConfigurationBuilder()
|
||||||
.AddXmlFile(appFolder.GetConfigPath(), optional: true, reloadOnChange: false)
|
.AddXmlFile(appFolder.GetConfigPath(), optional: true, reloadOnChange: false)
|
||||||
.AddInMemoryCollection(new List<KeyValuePair<string, string>> { new ("dataProtectionFolder", appFolder.GetDataProtectionPath()) })
|
.AddInMemoryCollection(new List<KeyValuePair<string, string>> { new ("dataProtectionFolder", appFolder.GetDataProtectionPath()) })
|
||||||
.AddEnvironmentVariables("Radarr__")
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user