From 456b8a8a7c7a07a09557f6d83f4cfab9818f9ef5 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 2 Nov 2021 10:58:16 +0100 Subject: [PATCH] Fixed test now that save of content types creates a cleanup policy --- .../ContentVersionCleanupService_Tests_Integration.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_Integration.cs b/src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_Integration.cs index ed177d35c3..4b795cf5a6 100644 --- a/src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_Integration.cs +++ b/src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_Integration.cs @@ -28,6 +28,11 @@ namespace Umbraco.Tests.Services // With 11M Property data var contentTypeA = MockedContentTypes.CreateSimpleContentType("contentTypeA", "contentTypeA"); + // Kill all historic + contentTypeA.HistoryCleanup.PreventCleanup = false; + contentTypeA.HistoryCleanup.KeepAllVersionsNewerThanDays = 0; + contentTypeA.HistoryCleanup.KeepLatestVersionPerDayForDays = 0; + ServiceContext.FileService.SaveTemplate(contentTypeA.DefaultTemplate); ServiceContext.ContentTypeService.Save(contentTypeA); @@ -44,8 +49,7 @@ namespace Umbraco.Tests.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); + ((IContentVersionService)ServiceContext.ContentService).PerformContentVersionCleanup(DateTime.Now.AddHours(1));