test(library): 隔离数据契约与 r11 身份自然键矩阵
真实本机 PG/ES/MinIO:v071 目录镜像 10 模式、结构引用/游标 15 模式、 8 表×2 外部范围身份矩阵、13 模式自然键(含软删除与合法同 parent 正例)、 备份期间三注入、收尾故障与授权撤销两个真实治理 PG 用例。 需隔离服务的用例在 test-scope.json 显式声明:普通 CI 跳过不算通过。
This commit is contained in:
@@ -45,6 +45,21 @@ func (s *baselineMutexStore) CreateLibraryJob(ctx context.Context, job governanc
|
||||
return s.fakeLibraryStore.CreateLibraryJob(ctx, job, stages, now)
|
||||
}
|
||||
|
||||
func (s *baselineMutexStore) CreateLibraryDispatch(ctx context.Context, job governance.LibraryJob, stages []string, handoff bool, now time.Time) (governance.LibraryJob, bool, error) {
|
||||
if s.activeByScope == nil {
|
||||
s.activeByScope = map[string]string{}
|
||||
}
|
||||
if s.activeByScope[job.Scope] != "" {
|
||||
return governance.LibraryJob{}, false, governance.ErrLibraryJobActive
|
||||
}
|
||||
created, reused, err := s.fakeLibraryStore.CreateLibraryDispatch(ctx, job, stages, handoff, now)
|
||||
if err == nil {
|
||||
s.activeByScope[job.Scope] = created.ID
|
||||
s.enqueues++
|
||||
}
|
||||
return created, reused, err
|
||||
}
|
||||
|
||||
func (s *baselineMutexStore) Enqueue(ctx context.Context, request jobs.EnqueueRequest, now time.Time) (*jobs.Job, error) {
|
||||
s.enqueues++
|
||||
return s.fakeLibraryStore.fakeJobStore.Enqueue(ctx, request, now)
|
||||
|
||||
Reference in New Issue
Block a user