package taskcontroller_test import ( "errors" "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" ) type TaskServiceMock struct { CreateFunc func(string) (*models.Task, error) UploadFunc func(*taskservice.TaskUploadInput) error } func (s *TaskServiceMock) Create(repo string) (*models.Task, error) { if s.CreateFunc != nil { return s.CreateFunc(repo) } return nil, errors.New("not implemented") } func (s *TaskServiceMock) Upload(input *taskservice.TaskUploadInput) error { if s.UploadFunc != nil { return s.UploadFunc(input) } return errors.New("not implemented") }