-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added test on put_object with nil
as object body
#351
Conversation
@@ -14,6 +14,12 @@ def test_put_object_string | |||
assert_equal(object_name, object[:name]) | |||
assert_equal(temp_file_content, object[:body]) | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
@@ -78,6 +67,25 @@ def put_object(bucket_name, | |||
:upload_source => data | |||
) | |||
end | |||
|
|||
protected | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
@@ -78,6 +67,25 @@ def put_object(bucket_name, | |||
:upload_source => data | |||
) | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
This is great, thank you! I'll kick off the Integration tests, once those pass we can merge. |
@vimutter Seems good, only the new test fails.
|
Will check them out today.
…On Tue, Jun 5, 2018, 03:59 Artem Yakimenko ***@***.***> wrote:
@vimutter <https://github.com/vimutter> Seems good, only the new test
fails. object_name is not instantiated.
1) Failure:
TestStorageRequests#test_put_object_nil [/tmp/build/453021c2/src/fog-google/test/integration/storage/test_objects.rb:19]:
[ArgumentError] exception expected, not
Class: <NameError>
Message: <"undefined local variable or method `object_name' for #<TestStorageRequests:0x00000004dd2e40>\nDid you mean? object_id">
---Backtrace---
/tmp/build/453021c2/src/fog-google/test/integration/storage/test_objects.rb:20:in `block in test_put_object_nil'
---------------
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#351 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABHFz2OCMMVCgHHk-mEyeyI63-3yvFPxks5t5eYIgaJpZM4UZJdL>
.
|
Fix trailing spaces Added data presence check to put_object `Fog::Storage::GoogleJSON.put_object` to be precise
@Temikus Sorry for failing tests, was making changes via github UI. Updated PR |
No worries at all! Thank you very much for your contribution @vimutter! |
I’ll merge this tomorrow morning - GitHub is being temperamental on iOS due to check status. |
We had some unclear situation while were testing file uploads. When we sent
nil
we gotClientError
stating that URL is bad and should be starting from/upload
. All of that were caused by invalid/unexpected command being created https://github.com/google/google-api-ruby-client/blob/e3b8c800d649da00748d4605d847b342480ecc73/generated/google/apis/storage_v1/service.rb#L1795