diff --git a/tests/Chronos.Data.Tests/Projects/ProjectServiceTests.cs b/tests/Chronos.Data.Tests/Projects/ProjectServiceTests.cs index 3c0a3cbf..d49ce1fe 100644 --- a/tests/Chronos.Data.Tests/Projects/ProjectServiceTests.cs +++ b/tests/Chronos.Data.Tests/Projects/ProjectServiceTests.cs @@ -154,7 +154,9 @@ public abstract class ProjectServiceTests(TestContext context) : DatabaseTest(co Assert.SequenceEqual([0, 4], mirrored.ExcludedFrames); Assert.Equal(0.7, mirrored.Exposure.ExposureOffsetEv); Assert.Equal(frames[2].Id, after.HeroFrameId); - Assert.Equal(after.SettingsJson, File.ReadAllText(fx.Paths.Sequence(sequence.Folder).ProjectPath)); + // PostgreSQL stores the settings as jsonb, which reorders keys: compare the JSON, not the text. + Assert.True(System.Text.Json.Nodes.JsonNode.DeepEquals(System.Text.Json.Nodes.JsonNode.Parse(after.SettingsJson!), + System.Text.Json.Nodes.JsonNode.Parse(File.ReadAllText(fx.Paths.Sequence(sequence.Folder).ProjectPath))), "project.json mirrors Main's head"); var row = (await fx.Db.Projects.GetAsync(main.Id))!; Assert.Equal((stored.Id, after.SettingsVersion), (row.MirroredVersionId, row.MirroredSettingsVersion)); // The mirror is no outside change: no version is added for it.