Disable update for docker containers (#715)

Also add docker info to about page and sentry context
This commit is contained in:
ta264 2019-04-05 16:47:26 +01:00 committed by GitHub
commit 4be01a5a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 101 additions and 30 deletions

View file

@ -5,6 +5,7 @@ using Moq;
using NUnit.Framework;
using NzbDrone.Common.Disk;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Download;
using NzbDrone.Core.Download.Clients;
using NzbDrone.Core.HealthCheck.Checks;
@ -86,7 +87,9 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
private void GivenDocker()
{
//
Mocker.GetMock<IOsInfo>()
.Setup(x => x.IsDocker)
.Returns(true);
}
[Test]
@ -139,9 +142,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
}
[Test]
[Explicit("Only works if running inside a docker container")]
public void should_return_docker_path_mapping_error_if_on_docker_and_root_missing()
{
GivenDocker();
Subject.Check().ShouldBeError(wikiFragment: "docker-bad-remote-path-mapping");
}
@ -215,9 +219,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
}
[Test]
[Explicit("Only works if running inside a docker container")]
public void should_return_docker_mapping_error_on_track_import_failed_event_inside_docker_if_folder_does_not_exist()
{
GivenDocker();
clientStatus.IsLocalhost = false;
var importEvent = new TrackImportFailedEvent(null, null, true, downloadItem);