Validates that the slave ID used by a task is correct.
| 1377 | |
| 1378 | // Validates that the slave ID used by a task is correct. |
| 1379 | Option<Error> validateSlaveID(const TaskInfo& task, Slave* slave) |
| 1380 | { |
| 1381 | if (task.slave_id() != slave->id) { |
| 1382 | return Error( |
| 1383 | "Task uses invalid agent " + task.slave_id().value() + |
| 1384 | " while agent " + slave->id.value() + " is expected"); |
| 1385 | } |
| 1386 | |
| 1387 | return None(); |
| 1388 | } |
| 1389 | |
| 1390 | |
| 1391 | Option<Error> validateKillPolicy(const TaskInfo& task) |
no test coverage detected