Add test to check that there are no pending database model changes (#25762)
This commit is contained in:
@@ -11,7 +11,6 @@ using Robust.Shared.Enums;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.UnitTesting;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Preferences
|
||||
@@ -119,6 +118,17 @@ namespace Content.IntegrationTests.Tests.Preferences
|
||||
await pair.CleanReturnAsync();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestNoPendingDatabaseChanges()
|
||||
{
|
||||
var pair = await PoolManager.GetServerClient();
|
||||
var server = pair.Server;
|
||||
var db = GetDb(server);
|
||||
Assert.That(async () => await db.HasPendingModelChanges(), Is.False,
|
||||
"The database has pending model changes. Add a new migration to apply them. See https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations");
|
||||
await pair.CleanReturnAsync();
|
||||
}
|
||||
|
||||
private static NetUserId NewUserId()
|
||||
{
|
||||
return new(Guid.NewGuid());
|
||||
|
||||
Reference in New Issue
Block a user