mirror of https://github.com/Radarr/Radarr
fixup! Modernize startup and ConfigFileProvider
This commit is contained in:
parent
31f082e516
commit
c7c5d176be
|
@ -544,10 +544,10 @@ stages:
|
|||
variables:
|
||||
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||
artifactName: linux-x64-tests
|
||||
Radarr__Postgres__Host: 'localhost'
|
||||
Radarr__Postgres__Port: '5432'
|
||||
Radarr__Postgres__User: 'radarr'
|
||||
Radarr__Postgres__Password: 'radarr'
|
||||
Radarr__PostgresHost: 'localhost'
|
||||
Radarr__PostgresPort: '5432'
|
||||
Radarr__PostgresUser: 'radarr'
|
||||
Radarr__PostgresPassword: 'radarr'
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
|
@ -681,10 +681,10 @@ stages:
|
|||
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||
variables:
|
||||
pattern: 'Radarr.*.linux-core-x64.tar.gz'
|
||||
Radarr__Postgres__Host: 'localhost'
|
||||
Radarr__Postgres__Port: '5432'
|
||||
Radarr__Postgres__User: 'radarr'
|
||||
Radarr__Postgres__Password: 'radarr'
|
||||
Radarr__PostgresHost: 'localhost'
|
||||
Radarr__PostgresPort: '5432'
|
||||
Radarr__PostgresUser: 'radarr'
|
||||
Radarr__PostgresPassword: 'radarr'
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
|
|
|
@ -2,6 +2,7 @@ using System.Linq;
|
|||
using DryIoc;
|
||||
using DryIoc.Microsoft.DependencyInjection;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
@ -32,7 +33,8 @@ namespace NzbDrone.Common.Test
|
|||
.AddStartupContext(new StartupContext("first", "second"));
|
||||
|
||||
container.RegisterInstance(new Mock<IHostLifetime>().Object);
|
||||
container.RegisterInstance(new Mock<IOptions<ConfigFileOptions>>().Object);
|
||||
container.RegisterInstance(new Mock<IConfiguration>().Object);
|
||||
container.RegisterInstance(new Mock<IOptionsMonitor<ConfigFileOptions>>().Object);
|
||||
|
||||
var serviceProvider = container.GetServiceProvider();
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.UpdateTests
|
|||
{
|
||||
Mocker.GetMock<IOptionsMonitor<ConfigFileOptions>>()
|
||||
.Setup(s => s.CurrentValue)
|
||||
.Returns(new ConfigFileOptions { UpdateMechanism = UpdateMechanism.Script, UpdateScriptPath = path });
|
||||
.Returns(new ConfigFileOptions { UpdateAutomatically = true, UpdateMechanism = UpdateMechanism.Script, UpdateScriptPath = path });
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.FileExists(path, StringComparison.Ordinal))
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace NzbDrone.Integration.Test
|
|||
{
|
||||
Port = Interlocked.Increment(ref StaticPort);
|
||||
|
||||
Options = ConfigFileOptions.GetOptions();
|
||||
Options = PostgresDatabase.GetTestOptions();
|
||||
|
||||
if (Options?.PostgresHost != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue