| 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; |
nothing calls this directly
no test coverage detected