Skip to content

Commit 02cb2c8

Browse files
fix lint issue
1 parent efabead commit 02cb2c8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
end
3434

3535
after do
36-
delete_bucket_helper bucket_name until count_anywhere_caches bucket_name == 0
36+
delete_bucket_helper(bucket_name) until count_anywhere_caches(bucket_name) == 0
3737
end
3838

3939
it "handles Anywhere cache lifecycle in sequence" do

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_anywhere_cache bucket_name:, zone:
4141
# The cache is created in the specified bucket.
4242
begin
4343
operation = storage_control_client.create_anywhere_cache request
44-
if operation.class == Gapic::Operation
44+
if operation.instance_of?(Gapic::Operation)
4545
puts "AnywhereCache operation created - #{operation.name}"
4646
get_request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new(
4747
name: name

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id:
2727
# Set project to "_" to signify global bucket
2828
parent = "projects/_/buckets/#{bucket_name}"
2929
name = "#{parent}/anywhereCaches/#{anywhere_cache_id}"
30-
ttl_in_seconds= 7200
30+
ttl_in_seconds = 7200
3131

3232
anywhere_cache = Google::Cloud::Storage::Control::V2::AnywhereCache.new(
3333
name: name,
@@ -43,13 +43,13 @@ def update_anywhere_cache bucket_name:, anywhere_cache_id:
4343
# The cache is identified by the specified ID.
4444
begin
4545
operation = storage_control_client.update_anywhere_cache request
46-
if operation.class == Gapic::Operation
46+
if operation.instance_of?(Gapic::Operation)
4747
puts "AnywhereCache operation created - #{operation.name}"
4848
get_request = Google::Cloud::Storage::Control::V2::GetAnywhereCacheRequest.new(
4949
name: name
5050
)
5151
result = storage_control_client.get_anywhere_cache get_request
52-
puts "AnywhereCache #{result.name} updated" if operation.class == Gapic::Operation
52+
puts "AnywhereCache #{result.name} updated"
5353
else
5454
puts "AnywhereCache update operation failed"
5555
end

0 commit comments

Comments
 (0)