-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bucket Policy Only Samples #557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the tests (linter) all pass
samples/buckets.js
Outdated
@@ -49,7 +49,7 @@ async function createBucket(bucketName) { | |||
async function listBuckets() { | |||
// [START storage_list_buckets] | |||
// Imports the Google Cloud client library | |||
const {Storage} = require('@google-cloud/storage'); | |||
const { Storage } = require('@google-cloud/storage'); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…rage into bucket-policy-only
@JustinBeckwith silly question. This feature has a lockedTime in RFC 3339 format. I suspect the client should help developers convert this into a |
samples/system-test/buckets.test.js
Outdated
true | ||
); | ||
const [metadata] = await bucket.getMetadata(); | ||
assert.strictEqual(metadata.iamConfiguration.bucketPolicyOnly.enabled, true); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@frankyn looks like we've never return @stephenplusplus have we ever discussed whether to convert |
Sorry I missed this question. I think our rule has been to simplify a handwritten response format as best we can, and leave the API's raw response format as it came. Considering a made-up method: file.getUsefulInfo((err, info, apiResponse) => {
info.createdAt === Date('...')
info.size === Number(8800)
apiResponse.createdAt === 'long-string-of-numbers'
apiResponse.size === '8800'
}) So, if a method exists and we can be more helpful by returning a handwritten response, we should be. For the |
Thanks @stephenplusplus and @kinwa91! Let's keep as-is. I'll resolve conflicts and merge after the workaround in this PR is no longer needed, e.g. Tomorrow EOD (Wednesday). |
@kinwa91 are you okay if I merge? |
These are samples to support Bucket Policy Only Samples.
I can't assign you @chestercun, PTAL. Thank you.