From e4b11c664c79b5ab11ca8487b171d0aacc4343b2 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Mon, 24 Mar 2025 08:38:17 +0000 Subject: Disabled flaky tests --- .../Controllers/UserLibraryControllerTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers') diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs index 8df86111ee..98ad28f5bd 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs @@ -75,7 +75,7 @@ public sealed class UserLibraryControllerTests : IClassFixture Date: Fri, 11 Apr 2025 13:58:34 -0400 Subject: Add ServerName to startup configuration --- Jellyfin.Api/Controllers/StartupController.cs | 2 ++ Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs | 5 +++++ .../Controllers/StartupControllerTests.cs | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers') diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs index a6bc84311f..2278468d9f 100644 --- a/Jellyfin.Api/Controllers/StartupController.cs +++ b/Jellyfin.Api/Controllers/StartupController.cs @@ -58,6 +58,7 @@ public class StartupController : BaseJellyfinApiController { return new StartupConfigurationDto { + ServerName = _config.Configuration.ServerName, UICulture = _config.Configuration.UICulture, MetadataCountryCode = _config.Configuration.MetadataCountryCode, PreferredMetadataLanguage = _config.Configuration.PreferredMetadataLanguage @@ -74,6 +75,7 @@ public class StartupController : BaseJellyfinApiController [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult UpdateInitialConfiguration([FromBody, Required] StartupConfigurationDto startupConfiguration) { + _config.Configuration.ServerName = startupConfiguration.ServerName ?? string.Empty; _config.Configuration.UICulture = startupConfiguration.UICulture ?? string.Empty; _config.Configuration.MetadataCountryCode = startupConfiguration.MetadataCountryCode ?? string.Empty; _config.Configuration.PreferredMetadataLanguage = startupConfiguration.PreferredMetadataLanguage ?? string.Empty; diff --git a/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs b/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs index 4027078190..1ba23339d0 100644 --- a/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs +++ b/Jellyfin.Api/Models/StartupDtos/StartupConfigurationDto.cs @@ -5,6 +5,11 @@ namespace Jellyfin.Api.Models.StartupDtos; /// public class StartupConfigurationDto { + /// + /// Gets or sets the server name. + /// + public string? ServerName { get; set; } + /// /// Gets or sets UI language culture. /// diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs index 36861294b5..36ba6c7e35 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs @@ -31,6 +31,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers var config = new StartupConfigurationDto() { + ServerName = "NewServer", UICulture = "NewCulture", MetadataCountryCode = "be", PreferredMetadataLanguage = "nl" @@ -44,7 +45,8 @@ namespace Jellyfin.Server.Integration.Tests.Controllers Assert.Equal(MediaTypeNames.Application.Json, getResponse.Content.Headers.ContentType?.MediaType); var newConfig = await getResponse.Content.ReadFromJsonAsync(_jsonOptions); - Assert.Equal(config.UICulture, newConfig!.UICulture); + Assert.Equal(config.ServerName, newConfig!.ServerName); + Assert.Equal(config.UICulture, newConfig.UICulture); Assert.Equal(config.MetadataCountryCode, newConfig.MetadataCountryCode); Assert.Equal(config.PreferredMetadataLanguage, newConfig.PreferredMetadataLanguage); } -- cgit v1.2.3 From afdde7b2439e7f96da0abb9a0989a62770dfb63b Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Sat, 12 Apr 2025 09:12:33 -0400 Subject: Remove the hashed password from startup users response (#13904) --- Jellyfin.Api/Controllers/StartupController.cs | 3 +-- .../Controllers/StartupControllerTests.cs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers') diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs index 2278468d9f..09f20558fe 100644 --- a/Jellyfin.Api/Controllers/StartupController.cs +++ b/Jellyfin.Api/Controllers/StartupController.cs @@ -114,8 +114,7 @@ public class StartupController : BaseJellyfinApiController var user = _userManager.Users.First(); return new StartupUserDto { - Name = user.Username, - Password = user.Password + Name = user.Username }; } diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs index 36ba6c7e35..c8ae2a88af 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs @@ -90,9 +90,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers var newUser = await getResponse.Content.ReadFromJsonAsync(_jsonOptions); Assert.NotNull(newUser); Assert.Equal(user.Name, newUser.Name); - Assert.NotNull(newUser.Password); - Assert.NotEmpty(newUser.Password); - Assert.NotEqual(user.Password, newUser.Password); + Assert.Null(newUser.Password); } [Fact] -- cgit v1.2.3