17 #ifndef __TESTS_MOCKSLAVE_HPP__ 18 #define __TESTS_MOCKSLAVE_HPP__ 24 #include <gmock/gmock.h> 48 using ::testing::DoDefault;
49 using ::testing::Return;
84 corrections,
process::Future<std::list<mesos::slave::QoSCorrection>>());
94 const std::string&
id,
109 MOCK_METHOD6(___run,
void(
111 const FrameworkID& frameworkId,
112 const ExecutorID& executorId,
113 const ContainerID& containerId,
114 const std::vector<TaskInfo>& tasks,
115 const std::vector<TaskGroupInfo>& taskGroups));
117 void unmocked____run(
119 const FrameworkID& frameworkId,
120 const ExecutorID& executorId,
121 const ContainerID& containerId,
122 const std::vector<TaskInfo>& tasks,
123 const std::vector<TaskGroupInfo>& taskGroups);
125 MOCK_METHOD7(runTask,
void(
127 const FrameworkInfo& frameworkInfo,
128 const FrameworkID& frameworkId,
130 const TaskInfo& task,
131 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
134 void unmocked_runTask(
136 const FrameworkInfo& frameworkInfo,
137 const FrameworkID& frameworkId,
139 const TaskInfo& task,
140 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
144 const FrameworkInfo& frameworkInfo,
145 const ExecutorInfo& executorInfo,
148 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
152 const FrameworkInfo& frameworkInfo,
153 const ExecutorInfo& executorInfo,
156 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
159 MOCK_METHOD7(__run,
void(
160 const FrameworkInfo& frameworkInfo,
161 const ExecutorInfo& executorInfo,
164 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
166 bool executorGeneratedForCommandTask));
169 const FrameworkInfo& frameworkInfo,
170 const ExecutorInfo& executorInfo,
173 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
175 bool executorGeneratedForCommandTask);
177 MOCK_METHOD6(runTaskGroup,
void(
179 const FrameworkInfo& frameworkInfo,
180 const ExecutorInfo& executorInfo,
181 const TaskGroupInfo& taskGroup,
182 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
185 void unmocked_runTaskGroup(
187 const FrameworkInfo& frameworkInfo,
188 const ExecutorInfo& executorInfo,
189 const TaskGroupInfo& taskGroup,
190 const std::vector<ResourceVersionUUID>& resourceVersionUuids,
193 MOCK_METHOD2(killTask,
void(
195 const KillTaskMessage& killTaskMessage));
197 void unmocked_killTask(
199 const KillTaskMessage& killTaskMessage);
201 MOCK_METHOD2(authenticate,
void(
205 void unmocked_authenticate(
212 void unmocked_removeFramework(
218 void unmocked___recover(
223 void unmocked_qosCorrections();
227 mesos::slave::QoSCorrection>>& correction));
233 MOCK_METHOD3(executorTerminated,
void(
234 const FrameworkID& frameworkId,
235 const ExecutorID& executorId,
237 mesos::slave::ContainerTermination>>& termination));
239 void unmocked_executorTerminated(
240 const FrameworkID& frameworkId,
241 const ExecutorID& executorId,
243 mesos::slave::ContainerTermination>>& termination);
245 MOCK_METHOD3(shutdownExecutor,
void(
247 const FrameworkID& frameworkId,
248 const ExecutorID& executorId));
250 void unmocked_shutdownExecutor(
252 const FrameworkID& frameworkId,
253 const ExecutorID& executorId);
255 MOCK_METHOD2(_shutdownExecutor,
void(
259 void unmocked__shutdownExecutor(
264 const ApplyOperationMessage& message));
266 void unmocked_applyOperation(
267 const ApplyOperationMessage& message);
274 #endif // __TESTS_MOCKSLAVE_HPP__ MOCK_METHOD0(oversubscribable, process::Future< Resources >())
~MockResourceEstimator() override
Definition: option.hpp:29
Definition: mock_slave.hpp:73
Definition: volume_gid_manager.hpp:42
Definition: duration.hpp:32
Definition: task_status_update_manager.hpp:58
virtual process::Future< Resources > oversubscribable()=0
Definition: resource_estimator.hpp:37
Try< ResourceStatistics > usage(pid_t pid, bool mem=true, bool cpus=true)
Definition: containerizer.hpp:64
Definition: slave.hpp:118
An "untyped" PID, used to encapsulate the process ID for lower-layer abstractions (eg...
Definition: pid.hpp:39
Definition: future_tracker.hpp:84
MOCK_METHOD1(initialize, Try< Nothing >(const lambda::function< process::Future< ResourceUsage >()> &))
virtual Try< Nothing > initialize(const lambda::function< process::Future< ResourceUsage >()> &usage)=0
The SecretGenerator interface represents a mechanism to create a secret from a principal.
Definition: secret_generator.hpp:34
Try< std::vector< Entry > > list(const std::string &hierarchy, const std::string &cgroup)
Definition: attributes.hpp:24
Definition: mock_slave.hpp:55
Definition: mock_slave.hpp:90
An abstraction of a Master detector which can be used to detect the leading master from a group...
Definition: detector.hpp:38
Definition: qos_controller.hpp:44
Definition: slave.hpp:957
Definition: slave.hpp:1144
Definition: future.hpp:58