package projectinstance import ( "fmt" ) // SeedProjectMeta 供测试注入项目元数据。 func SeedProjectMeta(store Store, projectID int64, lifecycle, activeKey string, selectionVer, planRev int) error { ms, ok := store.(*memStore) if !ok { return fmt.Errorf("SeedProjectMeta only supported on memStore") } ms.mu.Lock() defer ms.mu.Unlock() ms.meta[projectID] = projectMeta{ lifecycle: lifecycle, activeKey: activeKey, selectionVer: selectionVer, planRevision: planRev, } return nil }