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

Function getAppcImage

src/tests/containerizer/provisioner_appc_tests.cpp:91–114  ·  view source on GitHub ↗

* Helper function that returns a Appc protobuf object for given * parameters. * * @param name Appc image name. * @param arch Machine architecture(e.g, x86, amd64). * @param os Operating system(e.g, linux). * @return Appc protobuf message object. */

Source from the content-addressed store, hash-verified

89 * @return Appc protobuf message object.
90 */
91static Image::Appc getAppcImage(
92 const string& name,
93 const string& arch = "amd64",
94 const string& os = "linux")
95{
96 Image::Appc appc;
97 appc.set_name(name);
98
99 Label archLabel;
100 archLabel.set_key("arch");
101 archLabel.set_value(arch);
102
103 Label osLabel;
104 osLabel.set_key("os");
105 osLabel.set_value(os);
106
107 Labels labels;
108 labels.add_labels()->CopyFrom(archLabel);
109 labels.add_labels()->CopyFrom(osLabel);
110
111 appc.mutable_labels()->CopyFrom(labels);
112
113 return appc;
114}
115
116
117class AppcStoreTest : public TemporaryDirectoryTest

Callers 1

TEST_FFunction · 0.85

Calls 1

CopyFromMethod · 0.80

Tested by

no test coverage detected