{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2902","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2902/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2902/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2902/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2902","id":297052036,"number":2902,"title":"Method listing the contents of a bucket in FakeStorageRpc does not use bucket name","user":{"login":"norbjd","id":26850303,"avatar_url":"https://avatars2.githubusercontent.com/u/26850303?v=4","gravatar_id":"","url":"https://api.github.com/users/norbjd","html_url":"https://github.com/norbjd","followers_url":"https://api.github.com/users/norbjd/followers","following_url":"https://api.github.com/users/norbjd/following{/other_user}","gists_url":"https://api.github.com/users/norbjd/gists{/gist_id}","starred_url":"https://api.github.com/users/norbjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norbjd/subscriptions","organizations_url":"https://api.github.com/users/norbjd/orgs","repos_url":"https://api.github.com/users/norbjd/repos","events_url":"https://api.github.com/users/norbjd/events{/privacy}","received_events_url":"https://api.github.com/users/norbjd/received_events","type":"User","site_admin":false},"labels":[{"id":175662348,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/api:%20storage","name":"api: storage","color":"f8f8f8","default":false},{"id":544203936,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/priority:%20p2","name":"priority: p2","color":"fef2c0","default":false},{"id":144595208,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/type:%20question","name":"type: question","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"hzyi-google","id":33737743,"avatar_url":"https://avatars0.githubusercontent.com/u/33737743?v=4","gravatar_id":"","url":"https://api.github.com/users/hzyi-google","html_url":"https://github.com/hzyi-google","followers_url":"https://api.github.com/users/hzyi-google/followers","following_url":"https://api.github.com/users/hzyi-google/following{/other_user}","gists_url":"https://api.github.com/users/hzyi-google/gists{/gist_id}","starred_url":"https://api.github.com/users/hzyi-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzyi-google/subscriptions","organizations_url":"https://api.github.com/users/hzyi-google/orgs","repos_url":"https://api.github.com/users/hzyi-google/repos","events_url":"https://api.github.com/users/hzyi-google/events{/privacy}","received_events_url":"https://api.github.com/users/hzyi-google/received_events","type":"User","site_admin":false},"assignees":[{"login":"hzyi-google","id":33737743,"avatar_url":"https://avatars0.githubusercontent.com/u/33737743?v=4","gravatar_id":"","url":"https://api.github.com/users/hzyi-google","html_url":"https://github.com/hzyi-google","followers_url":"https://api.github.com/users/hzyi-google/followers","following_url":"https://api.github.com/users/hzyi-google/following{/other_user}","gists_url":"https://api.github.com/users/hzyi-google/gists{/gist_id}","starred_url":"https://api.github.com/users/hzyi-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzyi-google/subscriptions","organizations_url":"https://api.github.com/users/hzyi-google/orgs","repos_url":"https://api.github.com/users/hzyi-google/repos","events_url":"https://api.github.com/users/hzyi-google/events{/privacy}","received_events_url":"https://api.github.com/users/hzyi-google/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-14T10:53:58Z","updated_at":"2018-02-14T22:23:20Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nThe 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](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/v0.34.0/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing/FakeStorageRpc.java#L122)). I'm using version 0.34.0, but it seems like in previous versions the behaviour was similar. Am I missing something ?\r\n\r\nAs 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 : \r\n\r\n```\r\nStorage storage = LocalStorageHelper.customOptions(true).getService()\r\n\r\n[...] // creating dummy files in two separate buckets (b1 and b2)\r\n\r\nstorage.list(\"b1\") // returns all files in b1 and b2\r\n```\r\n\r\nI double checked in the doc, listing the contents of a bucket is however [defined as a supported operation](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/v0.34.0/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing/FakeStorageRpc.java#L53)."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/comments/365764911","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2902#issuecomment-365764911","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/2902","id":365764911,"user":{"login":"pongad","id":1617025,"avatar_url":"https://avatars1.githubusercontent.com/u/1617025?v=4","gravatar_id":"","url":"https://api.github.com/users/pongad","html_url":"https://github.com/pongad","followers_url":"https://api.github.com/users/pongad/followers","following_url":"https://api.github.com/users/pongad/following{/other_user}","gists_url":"https://api.github.com/users/pongad/gists{/gist_id}","starred_url":"https://api.github.com/users/pongad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pongad/subscriptions","organizations_url":"https://api.github.com/users/pongad/orgs","repos_url":"https://api.github.com/users/pongad/repos","events_url":"https://api.github.com/users/pongad/events{/privacy}","received_events_url":"https://api.github.com/users/pongad/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T22:23:20Z","updated_at":"2018-02-14T22:23:20Z","author_association":"CONTRIBUTOR","body":"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.\r\n\r\nWe should definitely document this. We can treat the ability to properly handle buckets as a feature request."}}
{"actor":{"display_login":"pongad"}}