Skip to content

Commit e276162

Browse files
committed
Ensure unique blob names in client tests
1 parent 2643be8 commit e276162

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/client/test_client.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def setup
2222
principal_id: @principal_id,
2323
host: @host,
2424
)
25-
@key = "test client##{name}"
25+
@uid = SecureRandom.uuid
26+
@key = "test-client-#{name}-#{@uid}"
2627
@content = "Some random content #{Random.rand(200)}"
2728
end
2829

@@ -197,9 +198,9 @@ def test_delete
197198
end
198199

199200
def test_delete_prefix
200-
prefix = "#{name}_prefix"
201+
prefix = "#{name}_prefix_#{@uid}"
201202
keys = 4.times.map do |i|
202-
key = "#{prefix}/#{name}_#{i}"
203+
key = "#{prefix}/#{i}"
203204
client.create_block_blob(key, content)
204205
key
205206
end
@@ -212,7 +213,7 @@ def test_delete_prefix
212213
end
213214

214215
def test_list_prefix
215-
prefix = "#{name}_prefix"
216+
prefix = "#{name}_prefix_#{@uid}"
216217
@key = "#{prefix}/#{key}"
217218
client.create_block_blob(key, content)
218219

@@ -222,9 +223,9 @@ def test_list_prefix
222223
end
223224

224225
def test_list_blobs_with_pages
225-
prefix = "#{name}_prefix"
226+
prefix = "#{name}_prefix_#{@uid}"
226227
keys = 4.times.map do |i|
227-
key = "#{prefix}/#{name}_#{i}"
228+
key = "#{prefix}/#{i}"
228229
client.create_block_blob(key, content)
229230
key
230231
end

0 commit comments

Comments
 (0)