完善域名服务器多对多关联与共享路径预检,补齐回归源码及进度文档
支持同项目内域名与服务器双向复用,局部修改和清空不影响其他域名;在绑定保存、服务器编辑和部署前拒绝已知共享路径冲突。 新增仓储、接口、工作流与页面回归源码,同步任务状态和第三版接口交接。按要求先开发后统一测试,本批未运行测试、构建或部署,保留在途任务与主机别名等待办。
This commit is contained in:
1 parent
f38e290b22
commit
e2200534d3
25 files changed
+740
-41
No files matched your search
@@ -29,10 +29,24 @@ func (s *workflowCertificateService) Import(context.Context, certificate.ImportR
|
||||
|
||||
type workflowServerLister struct {
|
||||
servers []deployment.Server
|
||||
err error
|
||||
}
|
||||
|
||||
func (s workflowServerLister) ListServersByDomainID(context.Context, string) ([]deployment.Server, error) {
|
||||
return s.servers, nil
|
||||
func (s workflowServerLister) ListDeploymentServersByDomainID(context.Context, string) ([]deployment.Server, error) {
|
||||
return s.servers, s.err
|
||||
}
|
||||
|
||||
func TestCertificateWorkflowStopsBeforeRemoteWriteOnSharedPathConflict(t *testing.T) {
|
||||
deployer := &workflowDeployer{}
|
||||
workflow := &CertificateWorkflow{
|
||||
Domains: &workflowDomainState{},
|
||||
Servers: workflowServerLister{err: deployment.ErrSharedPathConflict},
|
||||
Deployment: deployer,
|
||||
}
|
||||
_, err := workflow.deploy(t.Context(), certificate.IssueResult{DomainID: "shared-domain"})
|
||||
if !errors.Is(err, deployment.ErrSharedPathConflict) || deployer.targets != nil {
|
||||
t.Fatalf("路径冲突后仍尝试远端部署:%v,%+v", err, deployer.targets)
|
||||
}
|
||||
}
|
||||
|
||||
type workflowDeployer struct {
|
||||
|
||||
Reference in new issue
Block a user