Skip to content

Commit 3d99665

Browse files
updated
1 parent 267c543 commit 3d99665

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

google-cloud-storage-control-v2/lib/google/cloud/storage/control/v2/storage_control/operations.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ def get_operation request, options = nil
283283

284284
# Customize the options with defaults
285285
metadata = @config.rpcs.get_operation.metadata.to_h
286-
binding.pry
287-
288286
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
289287
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
290288
lib_name: @config.lib_name, lib_version: @config.lib_version,

google-cloud-storage-control/samples/acceptance/helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def retry_resource_exhaustion
7272
# @param bucket_name [String] The name of the Google Cloud Storage bucket.
7373
# @return [Integer] The final count of Anywhere Caches, which will be 0
7474
# the method completes successfully after all caches are deleted.
75-
def count_anywhere_caches bucket_name = nil
75+
def count_anywhere_caches bucket_name
7676
storage_control_client = Google::Cloud::Storage::Control.storage_control
7777

7878
# Set project to "_" to signify global bucket

google-cloud-storage-control/samples/acceptance/storage_control_anywhere_cache_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
end
3333

3434
after :all do
35-
delete_bucket_helper bucket_name until count_anywhere_caches(bucket_name).zero?
35+
count_anywhere_caches bucket_name # Ensure all caches are deleted before deleting bucket
36+
delete_bucket_helper bucket_name
3637
end
3738

3839
it "handles Anywhere cache lifecycle in sequence" do

google-cloud-storage-control/samples/storage_control_resume_anywhere_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def resume_anywhere_cache bucket_name:, anywhere_cache_id:
2424

2525
# Create a client object. The client can be reused for multiple calls.
2626
storage_control_client = Google::Cloud::Storage::Control.storage_control
27-
parent = "projects/_/buckets/#{bucket_name}"
2827
# Set project to "_" to signify global bucket
28+
parent = "projects/_/buckets/#{bucket_name}"
2929
name = "#{parent}/anywhereCaches/#{anywhere_cache_id}"
3030

3131
# Create a request.

0 commit comments

Comments
 (0)