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

Function TEST_F

src/tests/containerizer/provisioner_docker_tests.cpp:196–216  ·  view source on GitHub ↗

This test verifies that a locally stored Docker image in the form of a tar archive created from a 'docker save' command can be unpacked and stored in the proper locations accessible to the Docker provisioner.

Source from the content-addressed store, hash-verified

194// tar archive created from a 'docker save' command can be unpacked and
195// stored in the proper locations accessible to the Docker provisioner.
196TEST_F(ProvisionerDockerLocalStoreTest, LocalStoreTestWithTar)
197{
198 slave::Flags flags;
199 flags.docker_registry = path::join(os::getcwd(), "images");
200 flags.docker_store_dir = path::join(os::getcwd(), "store");
201 flags.image_provisioner_backend = COPY_BACKEND;
202
203 Try<Owned<slave::Store>> store = slave::docker::Store::create(flags);
204 ASSERT_SOME(store);
205
206 Image mesosImage;
207 mesosImage.set_type(Image::DOCKER);
208 mesosImage.mutable_docker()->set_name("abc");
209
210 Future<slave::ImageInfo> imageInfo =
211 store.get()->get(mesosImage, COPY_BACKEND);
212
213 AWAIT_READY(imageInfo);
214
215 verifyLocalDockerImage(flags, imageInfo->layers);
216}
217
218
219// This tests the ability of the metadata manger to recover the images it has

Callers

nothing calls this directly

Calls 15

getStoredImagesPathFunction · 0.85
touchFunction · 0.85
getImageLayerRootfsPathFunction · 0.85
FutureSatisfyFunction · 0.85
parseImageReferenceFunction · 0.85
SecondsClass · 0.85
MinutesClass · 0.85
getuidFunction · 0.85
formatFunction · 0.85
randomFunction · 0.85
getProvisionerDirFunction · 0.85
CopyFromMethod · 0.80

Tested by

no test coverage detected