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
1k stars 210 forks source link

Iam policy on bucket - not working #1257

Open tomaszmacnar opened 11 months ago

tomaszmacnar commented 11 months ago

I use fake-gcs-server in my integration tests. I create bucket and after it i try to get IAm policy on it. After call (java):

storage.getIamPolicy("XXX", Storage.BucketSourceOption.requestedPolicyVersion(GCP_POLICY_VERSION));

and http return: GET http://localhost:4443/storage/v1/b/XXX/iam?optionsRequestedPolicyVersion=3 Not Found When i get bucket info it return OK: GET http://localhost:4443/storage/v1/b/XXX

Is this mock not support iam ?

fsouza commented 11 months ago

Correct, that's currently not supported. With bucket attributes (#1174), it should be possible though.

vitalii-buchyn-exa commented 1 week ago

Hello community,

Having a similar issue, trying IAM().Policy(ctx) on a fake bucket, but getting 404

Just wonder if there is any workaround, except creating my own httptest server?

Thank you in advance.