| 156 | } |
| 157 | |
| 158 | func (ts *fakeTaskService) Create(ctx context.Context, in *tasks.CreateTaskRequest, opts ...grpc.CallOption) (*tasks.CreateTaskResponse, error) { |
| 159 | ts.Lock() |
| 160 | defer ts.Unlock() |
| 161 | |
| 162 | ts.createRequests[in.ContainerID] = in |
| 163 | return &tasks.CreateTaskResponse{ |
| 164 | ContainerID: in.ContainerID, |
| 165 | Pid: 1, |
| 166 | }, nil |
| 167 | } |
| 168 | |
| 169 | func (ts *fakeTaskService) Get(ctx context.Context, in *tasks.GetRequest, opts ...grpc.CallOption) (*tasks.GetResponse, error) { |
| 170 | return nil, errgrpc.ToGRPC(errdefs.ErrNotFound) |