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

Function createSlaveInfo

src/tests/slave_compatibility_tests.cpp:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35SlaveInfo createSlaveInfo(
36 const std::string& resources,
37 const std::string& attributes)
38{
39 SlaveID id;
40 id.set_value("agent");
41
42 Attributes agentAttributes = Attributes::parse(attributes);
43 Resources agentResources = Resources::parse(resources).get();
44
45 SlaveInfo slave;
46 *(slave.mutable_attributes()) = agentAttributes;
47 *(slave.mutable_resources()) = agentResources;
48 *(slave.mutable_id()) = id;
49 slave.set_hostname(id.value());
50
51 return slave;
52}
53
54
55TEST_F(SlaveCompatibilityTest, Equal)

Callers 1

TEST_FFunction · 0.70

Calls 3

parseFunction · 0.50
getMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected