aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/EfMigrations
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2025-02-02 02:21:34 +0000
committerJPVenson <github@jpb.email>2025-02-02 02:21:34 +0000
commit61b2ad7f496b6e47ed3646636f57d96916ffbf33 (patch)
treea65ad037b37416dac1b9d40d2c9e2df57b1a6800 /tests/Jellyfin.Server.Implementations.Tests/EfMigrations
parent2e5ff6842af11c4e8ba70a6df83e1676ba1bb5e0 (diff)
Added missing assembly info and fixed migration tests
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/EfMigrations')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs
index 54d5d2adf8..ab388eca86 100644
--- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs
+++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs
@@ -1,5 +1,7 @@
using System;
using System.Threading.Tasks;
+using Jellyfin.Database.Providers.PgSql;
+using Jellyfin.Server.Implementations.Migrations;
using Microsoft.EntityFrameworkCore;
using Xunit;
@@ -7,11 +9,19 @@ 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.");
- // }
+ [Fact]
+ public void CheckForUnappliedMigrations_PgSQL()
+ {
+ var dbDesignContext = new PgSqlDesignTimeJellyfinDbFactory();
+ var context = dbDesignContext.CreateDbContext([]);
+ Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration.");
+ }
+
+ [Fact]
+ public void CheckForUnappliedMigrations_SqLite()
+ {
+ var dbDesignContext = new SqliteDesignTimeJellyfinDbFactory();
+ var context = dbDesignContext.CreateDbContext([]);
+ Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model for PgSQL. Please create a Migration.");
+ }
}