Skip to content

Commit aef990a

Browse files
committed
FIX: GetFileInfoWithoutPermission check with real GCS without any key.
1 parent cfb755a commit aef990a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cpp/src/arrow/filesystem/gcsfs_test.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,14 +647,11 @@ TEST_F(GcsIntegrationTest, GetFileInfo) {
647647
AssertFileInfo(fs.get(), PreexistingBucketPath() + "dir/foo/", FileType::Directory);
648648
}
649649

650-
TEST_F(GcsIntegrationTest, GetFileInfo_WithoutPermission) {
651-
TimePoint expiration = std::chrono::system_clock::now() + std::chrono::minutes(5);
652-
auto options =
653-
GcsOptions::FromAccessToken(/*access_token=*/"invalid-access-token", expiration);
654-
options.endpoint_override = "127.0.0.1:" + Testbench()->port();
655-
650+
TEST_F(GcsIntegrationTest, GetFileInfoWithoutPermission) {
651+
auto options = GcsOptions::Defaults();
652+
// Test with real GCS.
656653
ASSERT_OK_AND_ASSIGN(auto fs, GcsFileSystem::Make(options));
657-
654+
// Without permission, always File typs is FileType::NotFound.
658655
constexpr auto kTextFileName = "dir/foo/bar.txt";
659656

660657
// check this is the File without permission.

0 commit comments

Comments
 (0)