MCPcopy Create free account
hub / github.com/apache/arrow / TestCreateContainerFromPath

Function TestCreateContainerFromPath

cpp/src/arrow/filesystem/azurefs_test.cc:2049–2065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2047 }
2048
2049 void TestCreateContainerFromPath() {
2050 auto data = SetUpPreexistingData();
2051 auto missing_path = data.RandomDirectoryPath(rng_);
2052 ASSERT_MOVE(missing_path, "new-container", ENOENT);
2053 EXPECT_RAISES_WITH_MESSAGE_THAT(
2054 Invalid,
2055 ::testing::HasSubstr("Creating files at '/' is not possible, only directories."),
2056 fs()->Move(data.ObjectPath(), "new-file"));
2057 auto src_dir_path = data.RandomDirectoryPath(rng_);
2058 ASSERT_OK(fs()->CreateDir(src_dir_path, false));
2059 EXPECT_OK_AND_ASSIGN(auto src_dir_info, fs()->GetFileInfo(src_dir_path));
2060 EXPECT_EQ(src_dir_info.type(), FileType::Directory);
2061 EXPECT_RAISES_WITH_MESSAGE_THAT(
2062 NotImplemented,
2063 HasCrossContainerNotImplementedMessage(src_dir_path, "new-container"),
2064 fs()->Move(src_dir_path, "new-container"));
2065 }
2066
2067 void TestMovePath() {
2068 Status st;

Callers

nothing calls this directly

Calls 6

fsFunction · 0.85
RandomDirectoryPathMethod · 0.80
ObjectPathMethod · 0.80
MoveMethod · 0.45
CreateDirMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected