Cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -139,7 +139,6 @@ namespace Umbraco.Tests.Scheduling
|
||||
mainDom.Setup(x => x.IsMainDom).Returns(true);
|
||||
serverRoleAccessor.Setup(x => x.CurrentServerRole).Returns(ServerRole.SchedulingPublisher);
|
||||
|
||||
|
||||
await sut.PerformExecuteAsync(null);
|
||||
|
||||
cleanupService.Verify(x => x.PerformContentVersionCleanup(It.IsAny<DateTime>()), Times.Once);
|
||||
|
||||
@@ -261,6 +261,5 @@ namespace Umbraco.Tests.Services
|
||||
Assert.AreEqual(6, results.Single(x => x.ContentTypeId == 2).VersionId);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,8 +503,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.BackOffice.Controllers
|
||||
mockShortStringHelper,
|
||||
globalSettings,
|
||||
new Mock<IHostingEnvironment>().Object,
|
||||
new Mock<IOptionsMonitor<ContentSettings>>().Object
|
||||
)
|
||||
new Mock<IOptionsMonitor<ContentSettings>>().Object)
|
||||
});
|
||||
var scopeProvider = Mock.Of<IScopeProvider>(x => x.CreateScope(
|
||||
It.IsAny<IsolationLevel>(),
|
||||
|
||||
Reference in New Issue
Block a user