Skip to content

Commit

Permalink
Fix the breaks of integration tests caused by #51
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxia committed Sep 30, 2016
1 parent 303cc54 commit c8ecbf7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ALL
* Added the retry for the timeout errors.
* Added the retry for the connection reset error.

BLOB
* Fixed the issue where "list_blobs" doesn't work when delimiter is specified. (https://github.com/Azure/azure-storage-ruby/issues/41)

2016.08 - version 0.11.0-preview

ALL
Expand Down
6 changes: 3 additions & 3 deletions test/integration/table/delete_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new "this_table.cannot-exist!", entity_properties["PartitionKey"]
batch.delete entity_properties["RowKey"]
subject.execute_batch batch
end
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new table_name, "this_partition/key#is_invalid"
batch.delete entity_properties["RowKey"]
subject.execute_batch batch
end
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new table_name, entity_properties["PartitionKey"]
batch.delete "thisrow/key#is_invalid"
subject.execute_batch batch
Expand Down
6 changes: 3 additions & 3 deletions test/integration/table/insert_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ def floor_to(num, x)
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new "this_table.cannot-exist!", entity_properties["PartitionKey"]
batch.insert entity_properties["RowKey"], entity_properties
results = subject.execute_batch batch
end
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["PartitionKey"] = "this/partition\\key#is?invalid"

Expand All @@ -96,7 +96,7 @@ def floor_to(num, x)
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this/row\\key#is?invalid"

Expand Down
6 changes: 3 additions & 3 deletions test/integration/table/insert_or_merge_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "row_key"

Expand All @@ -143,7 +143,7 @@
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["PartitionKey"] = "this/partition_key#is?invalid"
entity["RowKey"] = "row_key"
Expand All @@ -155,7 +155,7 @@
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this/partition_key#is?invalid"

Expand Down
6 changes: 3 additions & 3 deletions test/integration/table/insert_or_replace_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "row_key"

Expand All @@ -136,7 +136,7 @@
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["PartitionKey"] = "this/partition_key#is?invalid"
entity["RowKey"] = "row_key"
Expand All @@ -148,7 +148,7 @@
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this/partition_key#is?invalid"

Expand Down
8 changes: 4 additions & 4 deletions test/integration/table/merge_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
end

it "errors on a non-existing row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this-row-key-does-not-exist"

Expand All @@ -105,15 +105,15 @@
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new "this_table.cannot-exist!", entity_properties["PartitionKey"]
batch.merge entity_properties["RowKey"], entity_properties
etags = subject.execute_batch batch
end
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["PartitionKey"] = "this/partition_key#is?invalid"

Expand All @@ -124,7 +124,7 @@
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this/row_key#is?invalid"

Expand Down
8 changes: 4 additions & 4 deletions test/integration/table/update_entity_batch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
end

it "errors on a non-existing row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this-row-key-does-not-exist"

Expand All @@ -126,15 +126,15 @@
end

it "errors on an invalid table name" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
batch = Azure::Storage::Table::Batch.new "this_table.cannot-exist!", entity_properties["PartitionKey"]
batch.update entity_properties["RowKey"], entity_properties
etags = subject.execute_batch batch
end
end

it "errors on an invalid partition key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["PartitionKey"] = "this/partition_key#is?invalid"

Expand All @@ -145,7 +145,7 @@
end

it "errors on an invalid row key" do
assert_raises(Azure::Core::Http::HTTPError) do
assert_raises(RuntimeError) do
entity = entity_properties.dup
entity["RowKey"] = "this/row_key#is?invalid"

Expand Down

0 comments on commit c8ecbf7

Please sign in to comment.