From 4882837d602c19090be01a8287b6f5b536acb174 Mon Sep 17 00:00:00 2001 From: Berg Date: Tue, 2 Nov 2021 16:18:49 +0100 Subject: [PATCH] Fixed test --- .../Services/ContentVersionCleanupServiceTest.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentVersionCleanupServiceTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentVersionCleanupServiceTest.cs index 0f7ec616f7..9434a2bdb3 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentVersionCleanupServiceTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentVersionCleanupServiceTest.cs @@ -38,6 +38,12 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services FileService.SaveTemplate(template); ContentType contentTypeA = ContentTypeBuilder.CreateSimpleContentType("contentTypeA", "contentTypeA", defaultTemplateId: template.Id); + // Kill all historic + contentTypeA.HistoryCleanup.PreventCleanup = false; + contentTypeA.HistoryCleanup.KeepAllVersionsNewerThanDays = 0; + contentTypeA.HistoryCleanup.KeepLatestVersionPerDayForDays = 0; + + ContentTypeService.Save(contentTypeA); Content content = ContentBuilder.CreateSimpleContent(contentTypeA); @@ -53,9 +59,6 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services Debug.Assert(before.ContentVersions == 12); // 10 historic + current draft + current published Debug.Assert(before.PropertyData == 12 * 3); // CreateSimpleContentType = 3 props - // Kill all historic - InsertCleanupPolicy(contentTypeA, 0, 0); - ContentVersionService.PerformContentVersionCleanup(DateTime.Now.AddHours(1)); Report after = GetReport();