package deploy import ( "context" "log/slog" ) // NewTestService creates a Service with minimal dependencies for testing. func NewTestService(log *slog.Logger) *Service { return &Service{ log: log, } } // CancelActiveDeploy exposes cancelActiveDeploy for testing. func (svc *Service) CancelActiveDeploy(appID string) { svc.cancelActiveDeploy(appID) } // RegisterActiveDeploy registers an active deploy for testing. func (svc *Service) RegisterActiveDeploy(appID string, cancel context.CancelFunc, done chan struct{}) { svc.activeDeploys.Store(appID, &activeDeploy{cancel: cancel, done: done}) } // TryLockApp exposes tryLockApp for testing. func (svc *Service) TryLockApp(appID string) bool { return svc.tryLockApp(appID) } // UnlockApp exposes unlockApp for testing. func (svc *Service) UnlockApp(appID string) { svc.unlockApp(appID) }