Merge branch 'jellyfin:master' into feature/EFUserData

This commit is contained in:
JPVenson
2024-11-14 21:56:18 +01:00
committed by GitHub
63 changed files with 695 additions and 368 deletions

View File

@@ -0,0 +1,18 @@
using System;
using System.Threading.Tasks;
using Jellyfin.Server.Implementations.Migrations;
using Microsoft.EntityFrameworkCore;
using Xunit;
namespace Jellyfin.Server.Implementations.Tests.EfMigrations;
public class EfMigrationTests
{
[Fact]
public void CheckForUnappliedMigrations()
{
var dbDesignContext = new DesignTimeJellyfinDbFactory();
var context = dbDesignContext.CreateDbContext([]);
Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration.");
}
}

View File

@@ -10,6 +10,9 @@ namespace Jellyfin.Server.Implementations.Tests.Users
[InlineData("this_is_valid")]
[InlineData("this is also valid")]
[InlineData("0@_-' .")]
[InlineData("Aa0@_-' .+")]
[InlineData("thisisa+testemail@test.foo")]
[InlineData("------@@@--+++----@@--abcdefghijklmn---------@----_-_-___-_ .9foo+")]
public void ThrowIfInvalidUsername_WhenValidUsername_DoesNotThrowArgumentException(string username)
{
var ex = Record.Exception(() => UserManager.ThrowIfInvalidUsername(username));