This commit is contained in:
Elitsa Marinovska
2021-11-03 10:23:50 +01:00
parent a25183a063
commit 236bf88143
14 changed files with 46 additions and 42 deletions

View File

@@ -20,6 +20,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services
public IContentTypeService ContentTypeService => GetRequiredService<IContentTypeService>();
public IContentService ContentService => GetRequiredService<IContentService>();
public IContentVersionService ContentVersionService => GetRequiredService<IContentVersionService>();
/// <remarks>
@@ -29,7 +30,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services
[Test]
public void PerformContentVersionCleanup_WithNoKeepPeriods_DeletesEverythingExceptActive()
{
// For reference currently has
// For reference, Our currently has
// 5000 Documents
// With 200K Versions
// With 11M Property data
@@ -38,12 +39,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);