MCPcopy Create free account
hub / github.com/apache/mesos / createTasks

Function createTasks

src/tests/task_status_update_manager_tests.cpp:73–86  ·  view source on GitHub ↗

TODO(benh): Move this into utils, make more generic, and use in other tests.

Source from the content-addressed store, hash-verified

71// TODO(benh): Move this into utils, make more generic, and use in
72// other tests.
73vector<TaskInfo> createTasks(const Offer& offer)
74{
75 TaskInfo task;
76 task.set_name("test-task");
77 task.mutable_task_id()->set_value("1");
78 task.mutable_slave_id()->MergeFrom(offer.slave_id());
79 task.mutable_resources()->MergeFrom(offer.resources());
80 task.mutable_executor()->MergeFrom(DEFAULT_EXECUTOR_INFO);
81
82 vector<TaskInfo> tasks;
83 tasks.push_back(task);
84
85 return tasks;
86}
87
88
89class TaskStatusUpdateManagerTest: public MesosTest {};

Callers 2

TEST_FFunction · 0.85

Calls 2

MergeFromMethod · 0.80
resourcesMethod · 0.45

Tested by

no test coverage detected