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
parent 6afece237c
commit 4be01a5a95
13 changed files with 101 additions and 30 deletions
@@ -87,6 +87,16 @@ namespace NzbDrone.Core.Test.UpdateTests
.Returns(true);
}
[Test]
public void should_not_update_if_inside_docker()
{
Mocker.GetMock<IOsInfo>().Setup(x => x.IsDocker).Returns(true);
Subject.Invoking(x => x.Execute(new ApplicationUpdateCommand()))
.ShouldThrow<CommandFailedException>()
.WithMessage("Updating is disabled inside a docker container. Please update the container image.");
}
[Test]
public void should_delete_sandbox_before_update_if_folder_exists()
{