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

Function TestCreateContainerFromPath

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

Source from the content-addressed store, hash-verified

2067 }
2068
2069 void TestCreateContainerFromPath() {
2070 auto data = SetUpPreexistingData();
2071 auto missing_path = data.RandomDirectoryPath(rng_);
2072 ASSERT_MOVE(missing_path, "new-container", ENOENT);
2073 EXPECT_RAISES_WITH_MESSAGE_THAT(
2074 Invalid,
2075 ::testing::HasSubstr("Creating files at '/' is not possible, only directories."),
2076 fs()->Move(data.ObjectPath(), "new-file"));
2077 auto src_dir_path = data.RandomDirectoryPath(rng_);
2078 ASSERT_OK(fs()->CreateDir(src_dir_path, false));
2079 EXPECT_OK_AND_ASSIGN(auto src_dir_info, fs()->GetFileInfo(src_dir_path));
2080 EXPECT_EQ(src_dir_info.type(), FileType::Directory);
2081 EXPECT_RAISES_WITH_MESSAGE_THAT(
2082 NotImplemented,
2083 HasCrossContainerNotImplementedMessage(src_dir_path, "new-container"),
2084 fs()->Move(src_dir_path, "new-container"));
2085 }
2086
2087 void TestMovePath() {
2088 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