| 33 | |
| 34 | |
| 35 | SlaveInfo 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 | |
| 55 | TEST_F(SlaveCompatibilityTest, Equal) |