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

Function TEST_F

src/tests/containerizer/provisioner_appc_tests.cpp:248–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247
248TEST_F(AppcStoreTest, Recover)
249{
250 // Create store.
251 slave::Flags flags;
252 flags.appc_store_dir = path::join(os::getcwd(), "store");
253 Try<Owned<slave::Store>> store = Store::create(flags);
254 ASSERT_SOME(store);
255
256 Try<string> createImage = createTestImage(
257 flags.appc_store_dir,
258 getManifest());
259
260 ASSERT_SOME(createImage);
261
262 const string imagePath = createImage.get();
263
264 // Recover the image from disk.
265 AWAIT_READY(store.get()->recover());
266
267 Image image;
268 image.mutable_appc()->CopyFrom(getTestImage());
269
270 Future<slave::ImageInfo> ImageInfo = store.get()->get(image, COPY_BACKEND);
271 AWAIT_READY(ImageInfo);
272
273 EXPECT_EQ(1u, ImageInfo->layers.size());
274 ASSERT_SOME(os::realpath(imagePath));
275 EXPECT_EQ(
276 os::realpath(path::join(imagePath, "rootfs")).get(),
277 ImageInfo->layers.front());
278}
279
280
281class ProvisionerAppcTest : public AppcStoreTest {};

Callers

nothing calls this directly

Calls 15

getManifestFunction · 0.85
getProvisionerDirFunction · 0.85
listContainerRootfsesFunction · 0.85
PathClass · 0.85
randomFunction · 0.85
formatFunction · 0.85
getAppcImageFunction · 0.85
SecondsClass · 0.85
CopyFromMethod · 0.80
shareMethod · 0.80
createDetectorMethod · 0.80
fetchMethod · 0.65

Tested by

no test coverage detected