本文整理汇总了C++中Try::fslayers方法的典型用法代码示例。如果您正苦于以下问题:C++ Try::fslayers方法的具体用法?C++ Try::fslayers怎么用?C++ Try::fslayers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Try
的用法示例。
在下文中一共展示了Try::fslayers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Seconds
// Fetches the image manifest and all blobs in that image.
TEST_F(DockerFetcherPluginTest, INTERNET_CURL_FetchImage)
{
URI uri = uri::docker::image(
"library/busybox",
"latest",
DOCKER_REGISTRY_HOST);
Try<Owned<uri::Fetcher>> fetcher = uri::fetcher::create();
ASSERT_SOME(fetcher);
string dir = path::join(os::getcwd(), "dir");
AWAIT_READY_FOR(fetcher.get()->fetch(uri, dir), Seconds(60));
Try<string> _manifest = os::read(path::join(dir, "manifest"));
ASSERT_SOME(_manifest);
Try<docker::spec::v2::ImageManifest> manifest =
docker::spec::v2::parse(_manifest.get());
ASSERT_SOME(manifest);
EXPECT_EQ("library/busybox", manifest->name());
EXPECT_EQ("latest", manifest->tag());
for (int i = 0; i < manifest->fslayers_size(); i++) {
EXPECT_TRUE(os::exists(path::join(dir, manifest->fslayers(i).blobsum())));
}
}