feat(deploymentmanager): DeployAreaAsync bulk-deploys an area subtree through the shared DeploySiteAsync core; PreviewSubtreeDeployAsync returns confirm counts (Gitea #40)
DeploySiteAsync's body moves into a private core taking the site plus an optional area-id filter; site deploy behaviour is unchanged. The subtree is one in-memory ParentAreaId walk (cycle-safe) shared by the deploy and the preview. DeploymentService gains an ITemplateEngineRepository dependency for the area lookups.
This commit is contained in:
@@ -51,7 +51,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
_service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, _comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, _comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -196,7 +196,7 @@ public class DeploymentServiceTests : TestKit
|
||||
siteRepo.GetSiteByIdAsync(42, Arg.Any<CancellationToken>()).Returns((Site?)null);
|
||||
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, _comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, _comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -428,7 +428,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -1243,7 +1243,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
return new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -1862,7 +1862,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -1922,7 +1922,7 @@ public class DeploymentServiceTests : TestKit
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
var deadline = TimeSpan.FromMilliseconds(300);
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -1973,7 +1973,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
@@ -2021,7 +2021,7 @@ public class DeploymentServiceTests : TestKit
|
||||
|
||||
var siteRepo = CreateSiteRepoStub();
|
||||
var service = new DeploymentService(
|
||||
_repo, siteRepo, _pipeline, comms, _lockManager, _audit,
|
||||
_repo, siteRepo, Substitute.For<ITemplateEngineRepository>(), _pipeline, comms, _lockManager, _audit,
|
||||
new DiffService(),
|
||||
new RevisionHashService(),
|
||||
new DeploymentStatusNotifier(NullLogger<DeploymentStatusNotifier>.Instance),
|
||||
|
||||
Reference in New Issue
Block a user