fsouza / fake-gcs-server

Google Cloud Storage emulator & testing library.
https://pkg.go.dev/github.com/fsouza/fake-gcs-server/fakestorage?tab=doc
BSD 2-Clause "Simplified" License
1.03k stars 209 forks source link

Unable to list the Folders #1683

Open Mansur-L opened 1 month ago

Mansur-L commented 1 month ago

Tried creating a folder using storage in fake gcs. And created a files inside the folder. While trying to list the folders created using storage.create, the folder is not getting listed.

STORAGE.create(BucketInfo.newBuilder("Test bucket").build()); BlobId blobId3 = BlobId.of("Test bucket", "testDelete/"); BlobId blobId4 = BlobId.of("Test bucket", "testfolder/test.txt"); BlobInfo blobInfo3 = BlobInfo.newBuilder(blobId3).build(); BlobInfo blobInfo4 = BlobInfo.newBuilder(blobId4).build();

gfourny-sfeir commented 1 month ago

I have an exception on storage.get(bucket) Java API:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found GET http://storage:8000/storage/v1/b/output/o?projection=full { "code" : 404, "errors" : [ { "domain" : "global", "message" : "Not Found", "reason" : "Not Found" } ], "message" : "Not Found" }

If I request storage.get(bucket, blobName) it's working