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

Function TEST_F

src/tests/module_tests.cpp:184–199  ·  view source on GitHub ↗

Test that a module library gets loaded, and its contents version-verified. The provided test library matches the current Mesos version exactly.

Source from the content-addressed store, hash-verified

182// version-verified. The provided test library matches the current
183// Mesos version exactly.
184TEST_F(ModuleTest, ExampleModuleLoadTest)
185{
186 EXPECT_SOME(ModuleManager::load(defaultModules));
187
188 EXPECT_TRUE(ModuleManager::contains<TestModule>(DEFAULT_MODULE_NAME));
189 module = ModuleManager::create<TestModule>(DEFAULT_MODULE_NAME);
190 EXPECT_SOME(module);
191
192 // The TestModuleImpl module's implementation of foo() returns
193 // the sum of the passed arguments, whereas bar() returns the
194 // product. baz() returns '-1' if "sum" is not specified as the
195 // "operation" in the command line parameters.
196 EXPECT_EQ(1089, module.get()->foo('A', 1024));
197 EXPECT_EQ(5, module.get()->bar(0.5, 10.8));
198 EXPECT_EQ(-1, module.get()->baz(5, 10));
199}
200
201
202// Test that we can load module manifests from modules-dir.

Callers

nothing calls this directly

Calls 15

loadFunction · 0.85
protobufFunction · 0.85
getModulesFunction · 0.85
getModulesFromJsonFunction · 0.85
getModulePathFunction · 0.85
bazMethod · 0.80
joinFunction · 0.50
getcwdFunction · 0.50
mkdirFunction · 0.50
writeFunction · 0.50
stringifyFunction · 0.50
rmdirFunction · 0.50

Tested by

no test coverage detected