GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Method listing the contents of a bucket in FakeStorageRpc does not use bucket name · Issue #2902 · googleapis/google-cloud-java

Method listing the contents of a bucket in FakeStorageRpc does not use bucket name #2902

New issue
Copy link
New issue
Copy link
Closed
Closed
Method listing the contents of a bucket in FakeStorageRpc does not use bucket name#2902
Copy link
Assignees
yihanzhen
Labels
api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@norbjd
norbjd
opened on Feb 14, 2018
Issue body actions

Hello,

The implementation of the method list(String bucket, Map<Option, ?> options) in FakeStorageRpc does not use bucket parameter to retrieve the files inside the bucket passed as parameter (see FakeStorageRpc.java). I'm using version 0.34.0, but it seems like in previous versions the behaviour was similar. Am I missing something ?

As a consequence, when using LocalStorageHelper (using FakeStorageRpc) for local testing purposes, the following code does not retrieve only the files in the bucket passed as parameter, but all files in all created buckets :

Storage storage = LocalStorageHelper.customOptions(true).getService()

[...] // creating dummy files in two separate buckets (b1 and b2)

storage.list("b1") // returns all files in b1 and b2

I double checked in the doc, listing the contents of a bucket is however defined as a supported operation.

Activity

  1. norbjd
    changed the title [-]Method listing the contents of a bucket in `FakeStorageRpc` does not use bucket name[/-] [+]Method listing the contents of a bucket in FakeStorageRpc does not use bucket name[/+] on Feb 14, 2018
  2. yihanzhen
    added
    type: questionRequest for information or clarification. Not an issue.
    api: storageIssues related to the Cloud Storage API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Feb 14, 2018
  3. yihanzhen
    self-assigned this
    on Feb 14, 2018
  4. yihanzhen commented on Feb 14, 2018

    @yihanzhen
    yihanzhen
    on Feb 14, 2018
    Contributor
    More actions

    Hi @norbjd ,

    I believe the behavior is on purpose but the documentation does indeed cause confusion.

    This class is used to help test CloudStorageFileSystem. The cloud storage file system has similar behaviors as a file system whose root directory is a bucket. In this sense, it become much less important for the FakeStorageRpc class to support functionality across multi buckets. Also, the fact that FakeStorageRpc does not support creating, getting, deleting and listing of buckets should be due to the same reason.

    If you do want to add testings to storage itself locally, unit tests in google-cloud-storage using mocks might be helpful.

    @pongad Please take a look and see if I am correct. That being the case, shall we adjust the documentation?

  5. pongad commented on Feb 14, 2018

    @pongad
    pongad
    on Feb 14, 2018
    Contributor
    More actions

    I believe @hzyi-google is right (I'm not super familiar with this class myself). The FakeStorageRpc behaves as if it is bound to one bucket.

    We should definitely document this. We can treat the ability to properly handle buckets as a feature request.

  6. norbjd commented on Feb 15, 2018

    @norbjd
    norbjd
    on Feb 15, 2018
    Author
    More actions

    Thanks for your replies @hzyi-google @pongad

    It's all clear now, in fact I was just confused because the bucket parameter is not used in the implementation of list method in FakeStorageRpc.

    I looked to tests in google-cloud-storage as you suggest (BucketTest.java), but I am not able to used these tests "as-is", since many classes are package-private (for instance, I can't initialize a Blob).

    Storage can be mocked, and in this example, mocking also Blob works, but I think it will be a good idea to implement method to test storage locally (with LocalStorageHelper) without any mocking.

    Reacted by Jostein Gogstad
  7. yihanzhen commented on Feb 15, 2018

    @yihanzhen
    yihanzhen
    on Feb 15, 2018
    Contributor
    More actions

    I believe you are right. Let's treat this as a feature request.

  8. yihanzhen
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    and removed
    type: questionRequest for information or clarification. Not an issue.
    on Feb 15, 2018
  9. yihanzhen
    closed this as completedin #2906on Feb 21, 2018
  10. yihanzhen commented on Feb 21, 2018

    @yihanzhen
    yihanzhen
    on Feb 21, 2018
    Contributor
    More actions

    The feature request is added to the backlog. Feel free to add comments here.

  11. theacodes
    unassigned
    yihanzhen
    on Sep 28, 2018
  12. JustinBeckwith
    assigned
    yihanzhen
    on Feb 1, 2021
  13. chingor13
    added a commit that references this issue on Feb 20, 2026

    chore: Update generation configuration at Wed Mar 12 02:26:51 UTC 2025 (

    c21c5e0
  14. suztomo
    added a commit that references this issue on Mar 9, 2026

    chore(main): release 2.33.1-SNAPSHOT (#2902)

    b0a3311
  15. lqiu96
    added a commit that references this issue on Mar 20, 2026

    chore: Update generation configuration at Wed Mar 12 02:26:51 UTC 2025 (

    441547d
  16. chingor13
    added 2 commits that reference this issue on Mar 24, 2026

    deps: update opentelemetry.version to v1.35.0 (#2902)

    f2cdf12

    chore(main): release 6.60.1 (#2918)

    81293aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yihanzhen
    yihanzhen

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.