Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/blame/commit/c67b78bc68317c66f3324230b2fc36918b2b9d70/tests/Jellyfin.Api.Tests/Controllers/SystemControllerTests.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/tests/Jellyfin.Api.Tests/Controllers/SystemControllerTests.cs

36 lines
1.1 KiB

using Jellyfin.Api.Controllers;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller;
using MediaBrowser.Model.IO;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Moq;
using Xunit;
namespace Jellyfin.Api.Tests.Controllers
{
public class SystemControllerTests
{
[Fact]
public void GetLogFile_FileDoesNotExist_ReturnsNotFound()
{
var mockFileSystem = new Mock<IFileSystem>();
mockFileSystem
.Setup(fs => fs.GetFiles(It.IsAny<string>(), It.IsAny<bool>()))
.Returns([new() { Name = "file1.txt" }, new() { Name = "file2.txt" }]);
var controller = new SystemController(
Mock.Of<ILogger<SystemController>>(),
Mock.Of<IServerApplicationHost>(),
Mock.Of<IServerApplicationPaths>(),
mockFileSystem.Object,
Mock.Of<INetworkManager>(),
Mock.Of<ISystemManager>());
var result = controller.GetLogFile("DOES_NOT_EXIST.txt");
Assert.IsType<NotFoundObjectResult>(result);
}
}
}