Apache Mesos
mock_registrar.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __TESTS_MOCK_REGISTRAR_HPP__
18 #define __TESTS_MOCK_REGISTRAR_HPP__
19 
20 #include <string>
21 
22 #include <gmock/gmock.h>
23 
24 #include <mesos/state/state.hpp>
25 
26 #include <process/future.hpp>
27 #include <process/owned.hpp>
28 
29 #include <stout/none.hpp>
30 #include <stout/option.hpp>
31 
32 #include "master/flags.hpp"
33 #include "master/registrar.hpp"
34 
35 namespace mesos {
36 namespace internal {
37 namespace tests {
38 
40 {
41 public:
42  MockRegistrar(const master::Flags& flags,
43  mesos::state::State* state,
44  const Option<std::string>& authenticationRealm = None());
45 
46  ~MockRegistrar() override;
47 
49  apply,
52 
55 };
56 
57 } // namespace tests {
58 } // namespace internal {
59 } // namespace mesos {
60 
61 #endif // __TESTS_MOCK_REGISTRAR_HPP__
Definition: state.hpp:90
process::Future< bool > unmocked_apply(process::Owned< master::RegistryOperation > operation)
Definition: mock_registrar.hpp:39
Definition: registrar.hpp:88
Definition: agent.hpp:25
MockRegistrar(const master::Flags &flags, mesos::state::State *state, const Option< std::string > &authenticationRealm=None())
virtual process::Future< bool > apply(process::Owned< RegistryOperation > operation)
Definition: none.hpp:27
Definition: attributes.hpp:24
Definition: owned.hpp:36
Definition: parse.hpp:33
MOCK_METHOD1(apply, process::Future< bool >(process::Owned< master::RegistryOperation > operation))