{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/comments/87103769","pull_request_review_id":7729543,"id":87103769,"diff_hunk":"@@ -0,0 +1,487 @@\n+﻿// Copyright 2016 Google Inc. All Rights Reserved.\n+// \n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+// \n+//     http://www.apache.org/licenses/LICENSE-2.0\n+// \n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+using Google.Apis.Auth.OAuth2;\n+using Google.Apis.Json;\n+using System;\n+using System.IO;\n+using System.Linq;\n+using System.Net;\n+using System.Net.Http;\n+using System.Net.Http.Headers;\n+using System.Security.Cryptography;\n+using System.Threading.Tasks;\n+using System.Xml.Linq;\n+using Xunit;\n+\n+namespace Google.Storage.V1.IntegrationTests\n+{\n+    using static TestHelpers;\n+\n+    [Collection(nameof(StorageFixture))]\n+    public class SignedUrlUtilsTest\n+    {\n+        private readonly string _credentialsFilePath = GetCredentialsFilePath();\n+        private readonly StorageFixture _fixture;\n+        private readonly HttpClient _httpClient = new HttpClient();\n+\n+        public SignedUrlUtilsTest(StorageFixture fixture)\n+        {\n+            _fixture = fixture;\n+        }\n+\n+        [Fact]\n+        public async void DeleteTest()\n+        {\n+            var bucket = _fixture.SingleVersionBucket;\n+            var name = GenerateName();\n+            var duration = TimeSpan.FromSeconds(5);","path":"apis/Google.Storage.V1/Google.Storage.V1.IntegrationTests/SignedUrlUtilsTest.cs","position":49,"original_position":49,"commit_id":"9f3cde170395f03a4a54321a887a281e5c63d74b","original_commit_id":"9f3cde170395f03a4a54321a887a281e5c63d74b","user":{"login":"evildour","id":4014815,"avatar_url":"https://avatars.githubusercontent.com/u/4014815?v=3","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false},"body":"Yeah, I agree although I can't think of a clean way to do it at the moment. I'll take another look after merging. I did cut down the time for PutTest though by doing all 4 initial verifications first, then waiting 5 seconds, then checking that all 4 URLs expired.","created_at":"2016-11-08T23:00:16Z","updated_at":"2016-11-08T23:00:17Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516#discussion_r87103769","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/comments/87103769"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516#discussion_r87103769"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516","id":92515442,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/516","number":516,"state":"open","locked":false,"title":"Signed URLs for Storage","user":{"login":"evildour","id":4014815,"avatar_url":"https://avatars.githubusercontent.com/u/4014815?v=3","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false},"body":"Note: I wasn't quite sure how best to let someone specify the request and content headers. I originally had the parameters as HttpRequestHeaders and HttpContentHeaders, respectively, but since those types don't have public constructors, it made things a little weird for the normal case where you want to construct a URL to be used later. You needed to create a fake HttpRequestMessage and/or HttpContent value, populate them with the headers you want to be required in the Signed URL, and then pass those header collections. So I settled on having them be `Dictionary<string, IEnumerable<string>>`, but it still feels a little clumsy. Maybe someone can think of a better way.","created_at":"2016-11-07T02:29:50Z","updated_at":"2016-11-08T23:00:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83f7ea653fa29fbf2e649b465555d03f37fdc71e","assignee":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"assignees":[{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/516/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/statuses/9f3cde170395f03a4a54321a887a281e5c63d74b","head":{"label":"evildour:signed-urls","ref":"signed-urls","sha":"9f3cde170395f03a4a54321a887a281e5c63d74b","user":{"login":"evildour","id":4014815,"avatar_url":"https://avatars.githubusercontent.com/u/4014815?v=3","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false},"repo":{"id":62015644,"name":"google-cloud-dotnet","full_name":"evildour/google-cloud-dotnet","owner":{"login":"evildour","id":4014815,"avatar_url":"https://avatars.githubusercontent.com/u/4014815?v=3","gravatar_id":"","url":"https://api.github.com/users/evildour","html_url":"https://github.com/evildour","followers_url":"https://api.github.com/users/evildour/followers","following_url":"https://api.github.com/users/evildour/following{/other_user}","gists_url":"https://api.github.com/users/evildour/gists{/gist_id}","starred_url":"https://api.github.com/users/evildour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evildour/subscriptions","organizations_url":"https://api.github.com/users/evildour/orgs","repos_url":"https://api.github.com/users/evildour/repos","events_url":"https://api.github.com/users/evildour/events{/privacy}","received_events_url":"https://api.github.com/users/evildour/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evildour/google-cloud-dotnet","description":"Google Cloud Client Library for .NET","fork":true,"url":"https://api.github.com/repos/evildour/google-cloud-dotnet","forks_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/forks","keys_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/teams","hooks_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/hooks","issue_events_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/events","assignees_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/tags","blobs_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/languages","stargazers_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/stargazers","contributors_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/contributors","subscribers_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/subscribers","subscription_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/subscription","commits_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/merges","archive_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/downloads","issues_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/evildour/google-cloud-dotnet/deployments","created_at":"2016-06-27T01:02:10Z","updated_at":"2016-10-24T18:27:48Z","pushed_at":"2016-11-08T17:54:25Z","git_url":"git://github.com/evildour/google-cloud-dotnet.git","ssh_url":"git@github.com:evildour/google-cloud-dotnet.git","clone_url":"https://github.com/evildour/google-cloud-dotnet.git","svn_url":"https://github.com/evildour/google-cloud-dotnet","homepage":null,"size":9232,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"03d526377699788f45e4b78eeced0758fcfc7d36","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":35877412,"name":"google-cloud-dotnet","full_name":"GoogleCloudPlatform/google-cloud-dotnet","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet","description":"Google Cloud Client Library for .NET","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/deployments","created_at":"2015-05-19T11:14:02Z","updated_at":"2016-10-28T15:31:27Z","pushed_at":"2016-11-08T17:53:27Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-dotnet.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-dotnet.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet","homepage":"https://googlecloudplatform.github.io/google-cloud-dotnet/","size":12184,"stargazers_count":54,"watchers_count":54,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":25,"mirror_url":null,"open_issues_count":53,"forks":25,"open_issues":53,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-dotnet/pull/516"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/516"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-dotnet/statuses/9f3cde170395f03a4a54321a887a281e5c63d74b"}}}}
{"actor":{"display_login":"evildour"}}