diff --git a/samples/getSoftDeletedBucket.js b/samples/getSoftDeletedBucket.js index d49100e35..2cd3e8b39 100644 --- a/samples/getSoftDeletedBucket.js +++ b/samples/getSoftDeletedBucket.js @@ -15,7 +15,7 @@ */ function main(bucketName = 'my-bucket', generation = 123456789) { - // [START storage_get_softDeleted_bucket] + // [START storage_get_soft_deleted_bucket] /** * TODO(developer): Uncomment the following lines before running the sample. */ @@ -46,7 +46,7 @@ function main(bucketName = 'my-bucket', generation = 123456789) { } getSoftDeletedBucket().catch(console.error); - // [END storage_get_softDeleted_bucket] + // [END storage_get_soft_deleted_bucket] } main(...process.argv.slice(2)); diff --git a/samples/listSoftDeletedBucket.js b/samples/listSoftDeletedBucket.js index b4ea251ea..679bd6caf 100644 --- a/samples/listSoftDeletedBucket.js +++ b/samples/listSoftDeletedBucket.js @@ -15,7 +15,7 @@ */ function main() { - // [START storage_list_buckets] + // [START storage_list_soft_deleted_buckets] // Imports the Google Cloud client library const {Storage} = require('@google-cloud/storage'); @@ -36,7 +36,7 @@ function main() { } listSoftDeletedBuckets().catch(console.error); - // [END storage_list_buckets] + // [END storage_list_soft_deleted_buckets] } main(...process.argv.slice(2)); diff --git a/samples/restoreSoftDeletedBucket.js b/samples/restoreSoftDeletedBucket.js index 23d75a3d4..c6a2bbff5 100644 --- a/samples/restoreSoftDeletedBucket.js +++ b/samples/restoreSoftDeletedBucket.js @@ -14,16 +14,16 @@ * limitations under the License. */ -function main(bucketName = 'my-bucket', generation = 1) { - // [START storage_restore_bucket] +function main(bucketName = 'my-bucket', generation = 123456789) { + // [START storage_restore_soft_deleted_bucket] /** * TODO(developer): Uncomment the following lines before running the sample. */ // The ID of your GCS bucket // const bucketName = 'your-unique-bucket-name'; - // The version of your GCS bucket - // const generation = 'your-unique-bucket-generation-no'; + // The generation of the bucket to restore + // const generation = 123456789; // Imports the Google Cloud client library const {Storage} = require('@google-cloud/storage'); @@ -42,7 +42,7 @@ function main(bucketName = 'my-bucket', generation = 1) { } restoreSoftDeletedBucket().catch(console.error); - // [END storage_restore_bucket] + // [END storage_restore_soft_deleted_bucket] } main(...process.argv.slice(2)); diff --git a/system-test/storage.ts b/system-test/storage.ts index e563c692a..a55f60ced 100644 --- a/system-test/storage.ts +++ b/system-test/storage.ts @@ -794,7 +794,7 @@ describe('storage', function () { describe('buckets', () => { let bucket: Bucket; const SOFT_DELETE_RETENTION_SECONDS = 7 * 24 * 60 * 60; //7 days in seconds; - let generation = 123; + let generation = 123456789; before(async () => { bucket = storage.bucket(generateName()); diff --git a/test/bucket.ts b/test/bucket.ts index 220e8f38c..475ef35ed 100644 --- a/test/bucket.ts +++ b/test/bucket.ts @@ -2436,13 +2436,13 @@ describe('Bucket', () => { assert.deepStrictEqual(reqOpts, { method: 'POST', uri: '/restore', - qs: {generation: 123}, + qs: {generation: 123456789}, }); assert.strictEqual(callback_, undefined); return []; }; - await bucket.restore({generation: 123}); + await bucket.restore({generation: 123456789}); }); });