GitHub PullRequestReviewCommentEvent at 2014-07-02 17:50:44
Repository: docker
Actor: proppy
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/dotcloud/docker/pulls/comments/14472211","id":14472211,"diff_hunk":"@@ -289,6 +289,27 @@ func TestLogsNoStreams(t *testing.T) {\n \t}\n }\n \n+func TestTruncateLogs(t *testing.T) {\n+\teng := engine.New()\n+\tvar truncate_logs bool\n+\teng.Register(\"truncate_logs\", func(job *engine.Job) engine.Status {\n+\t\ttruncate_logs = true\n+\t\treturn engine.StatusOK\n+\t})\n+\tr := serveRequest(\"DELETE\", \"/containers/test/logs\", nil, eng, t)\n+\tif r.Code != http.StatusNoContent {\n+\t\tt.Fatalf(\"Got status %d, expected %d\", r.Code, http.StatusNoContent)\n+\t}\n+\tif !truncate_logs {\n+\t\tt.Fatal(\"truncate_logs job was not called\")\n+\t}\n+\tres := r.Body.String()\n+\texpected := \"\"\n+\tif res != expected {","path":"api/server/server_unit_test.go","position":20,"original_position":20,"commit_id":"06a63dfaf2b5f336a15135f2d4a510cab3a9ae4a","original_commit_id":"06a63dfaf2b5f336a15135f2d4a510cab3a9ae4a","user":{"login":"proppy","id":5268,"avatar_url":"https://avatars.githubusercontent.com/u/5268?","gravatar_id":"5520a5b945233739dda3299b70d13f0b","url":"https://api.github.com/users/proppy","html_url":"https://github.com/proppy","followers_url":"https://api.github.com/users/proppy/followers","following_url":"https://api.github.com/users/proppy/following{/other_user}","gists_url":"https://api.github.com/users/proppy/gists{/gist_id}","starred_url":"https://api.github.com/users/proppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proppy/subscriptions","organizations_url":"https://api.github.com/users/proppy/orgs","repos_url":"https://api.github.com/users/proppy/repos","events_url":"https://api.github.com/users/proppy/events{/privacy}","received_events_url":"https://api.github.com/users/proppy/received_events","type":"User","site_admin":false},"body":"I would just `len(res) > 0`","created_at":"2014-07-02T17:50:44Z","updated_at":"2014-07-02T17:50:44Z","html_url":"https://github.com/dotcloud/docker/pull/6662#discussion_r14472211","pull_request_url":"https://api.github.com/repos/dotcloud/docker/pulls/6662","_links":{"self":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/comments/14472211"},"html":{"href":"https://github.com/dotcloud/docker/pull/6662#discussion_r14472211"},"pull_request":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6662"}}},"pull_request":{"url":"https://api.github.com/repos/dotcloud/docker/pulls/6662","id":17569178,"html_url":"https://github.com/dotcloud/docker/pull/6662","diff_url":"https://github.com/dotcloud/docker/pull/6662.diff","patch_url":"https://github.com/dotcloud/docker/pull/6662.patch","issue_url":"https://api.github.com/repos/dotcloud/docker/issues/6662","number":6662,"state":"open","title":"Container log truncation","user":{"login":"freman","id":506680,"avatar_url":"https://avatars.githubusercontent.com/u/506680?","gravatar_id":"bf0ef2eb7d2c4a0a33b54904e1c51b0d","url":"https://api.github.com/users/freman","html_url":"https://github.com/freman","followers_url":"https://api.github.com/users/freman/followers","following_url":"https://api.github.com/users/freman/following{/other_user}","gists_url":"https://api.github.com/users/freman/gists{/gist_id}","starred_url":"https://api.github.com/users/freman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freman/subscriptions","organizations_url":"https://api.github.com/users/freman/orgs","repos_url":"https://api.github.com/users/freman/repos","events_url":"https://api.github.com/users/freman/events{/privacy}","received_events_url":"https://api.github.com/users/freman/received_events","type":"User","site_admin":false},"body":"Server, API, CLI command to truncate the logs of a container\r\n\r\nFixes #6630\r\n\r\nDocker-DCO-1.1-Signed-off-by: Shannon Wynter docker.github@fremnet.net (github: freman)","created_at":"2014-06-25T02:35:25Z","updated_at":"2014-07-02T17:50:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34c57a2e15fc1c18802f42ac4678771aee1aa070","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotcloud/docker/pulls/6662/commits","review_comments_url":"https://api.github.com/repos/dotcloud/docker/pulls/6662/comments","review_comment_url":"https://api.github.com/repos/dotcloud/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dotcloud/docker/issues/6662/comments","statuses_url":"https://api.github.com/repos/dotcloud/docker/statuses/06a63dfaf2b5f336a15135f2d4a510cab3a9ae4a","head":{"label":"freman:6630-truncate-logs","ref":"6630-truncate-logs","sha":"06a63dfaf2b5f336a15135f2d4a510cab3a9ae4a","user":{"login":"freman","id":506680,"avatar_url":"https://avatars.githubusercontent.com/u/506680?","gravatar_id":"bf0ef2eb7d2c4a0a33b54904e1c51b0d","url":"https://api.github.com/users/freman","html_url":"https://github.com/freman","followers_url":"https://api.github.com/users/freman/followers","following_url":"https://api.github.com/users/freman/following{/other_user}","gists_url":"https://api.github.com/users/freman/gists{/gist_id}","starred_url":"https://api.github.com/users/freman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freman/subscriptions","organizations_url":"https://api.github.com/users/freman/orgs","repos_url":"https://api.github.com/users/freman/repos","events_url":"https://api.github.com/users/freman/events{/privacy}","received_events_url":"https://api.github.com/users/freman/received_events","type":"User","site_admin":false},"repo":{"id":21186794,"name":"docker","full_name":"freman/docker","owner":{"login":"freman","id":506680,"avatar_url":"https://avatars.githubusercontent.com/u/506680?","gravatar_id":"bf0ef2eb7d2c4a0a33b54904e1c51b0d","url":"https://api.github.com/users/freman","html_url":"https://github.com/freman","followers_url":"https://api.github.com/users/freman/followers","following_url":"https://api.github.com/users/freman/following{/other_user}","gists_url":"https://api.github.com/users/freman/gists{/gist_id}","starred_url":"https://api.github.com/users/freman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freman/subscriptions","organizations_url":"https://api.github.com/users/freman/orgs","repos_url":"https://api.github.com/users/freman/repos","events_url":"https://api.github.com/users/freman/events{/privacy}","received_events_url":"https://api.github.com/users/freman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/freman/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/freman/docker","forks_url":"https://api.github.com/repos/freman/docker/forks","keys_url":"https://api.github.com/repos/freman/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freman/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freman/docker/teams","hooks_url":"https://api.github.com/repos/freman/docker/hooks","issue_events_url":"https://api.github.com/repos/freman/docker/issues/events{/number}","events_url":"https://api.github.com/repos/freman/docker/events","assignees_url":"https://api.github.com/repos/freman/docker/assignees{/user}","branches_url":"https://api.github.com/repos/freman/docker/branches{/branch}","tags_url":"https://api.github.com/repos/freman/docker/tags","blobs_url":"https://api.github.com/repos/freman/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freman/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freman/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/freman/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freman/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/freman/docker/languages","stargazers_url":"https://api.github.com/repos/freman/docker/stargazers","contributors_url":"https://api.github.com/repos/freman/docker/contributors","subscribers_url":"https://api.github.com/repos/freman/docker/subscribers","subscription_url":"https://api.github.com/repos/freman/docker/subscription","commits_url":"https://api.github.com/repos/freman/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/freman/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/freman/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/freman/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/freman/docker/contents/{+path}","compare_url":"https://api.github.com/repos/freman/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freman/docker/merges","archive_url":"https://api.github.com/repos/freman/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freman/docker/downloads","issues_url":"https://api.github.com/repos/freman/docker/issues{/number}","pulls_url":"https://api.github.com/repos/freman/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/freman/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/freman/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freman/docker/labels{/name}","releases_url":"https://api.github.com/repos/freman/docker/releases{/id}","created_at":"2014-06-25T01:50:37Z","updated_at":"2014-06-26T05:40:48Z","pushed_at":"2014-06-30T02:03:17Z","git_url":"git://github.com/freman/docker.git","ssh_url":"git@github.com:freman/docker.git","clone_url":"https://github.com/freman/docker.git","svn_url":"https://github.com/freman/docker","homepage":"http://www.docker.com","size":28387,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotcloud:master","ref":"master","sha":"0757a5663a704c5ffd1181b438703d9113dc4c8c","user":{"login":"dotcloud","id":171922,"avatar_url":"https://avatars.githubusercontent.com/u/171922?","gravatar_id":"d2fbb59e6c8b80a26e48b06ea30d53fd","url":"https://api.github.com/users/dotcloud","html_url":"https://github.com/dotcloud","followers_url":"https://api.github.com/users/dotcloud/followers","following_url":"https://api.github.com/users/dotcloud/following{/other_user}","gists_url":"https://api.github.com/users/dotcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/dotcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotcloud/subscriptions","organizations_url":"https://api.github.com/users/dotcloud/orgs","repos_url":"https://api.github.com/users/dotcloud/repos","events_url":"https://api.github.com/users/dotcloud/events{/privacy}","received_events_url":"https://api.github.com/users/dotcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"dotcloud/docker","owner":{"login":"dotcloud","id":171922,"avatar_url":"https://avatars.githubusercontent.com/u/171922?","gravatar_id":"d2fbb59e6c8b80a26e48b06ea30d53fd","url":"https://api.github.com/users/dotcloud","html_url":"https://github.com/dotcloud","followers_url":"https://api.github.com/users/dotcloud/followers","following_url":"https://api.github.com/users/dotcloud/following{/other_user}","gists_url":"https://api.github.com/users/dotcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/dotcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotcloud/subscriptions","organizations_url":"https://api.github.com/users/dotcloud/orgs","repos_url":"https://api.github.com/users/dotcloud/repos","events_url":"https://api.github.com/users/dotcloud/events{/privacy}","received_events_url":"https://api.github.com/users/dotcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotcloud/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/dotcloud/docker","forks_url":"https://api.github.com/repos/dotcloud/docker/forks","keys_url":"https://api.github.com/repos/dotcloud/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotcloud/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotcloud/docker/teams","hooks_url":"https://api.github.com/repos/dotcloud/docker/hooks","issue_events_url":"https://api.github.com/repos/dotcloud/docker/issues/events{/number}","events_url":"https://api.github.com/repos/dotcloud/docker/events","assignees_url":"https://api.github.com/repos/dotcloud/docker/assignees{/user}","branches_url":"https://api.github.com/repos/dotcloud/docker/branches{/branch}","tags_url":"https://api.github.com/repos/dotcloud/docker/tags","blobs_url":"https://api.github.com/repos/dotcloud/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotcloud/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotcloud/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotcloud/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotcloud/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dotcloud/docker/languages","stargazers_url":"https://api.github.com/repos/dotcloud/docker/stargazers","contributors_url":"https://api.github.com/repos/dotcloud/docker/contributors","subscribers_url":"https://api.github.com/repos/dotcloud/docker/subscribers","subscription_url":"https://api.github.com/repos/dotcloud/docker/subscription","commits_url":"https://api.github.com/repos/dotcloud/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotcloud/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotcloud/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotcloud/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/dotcloud/docker/contents/{+path}","compare_url":"https://api.github.com/repos/dotcloud/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotcloud/docker/merges","archive_url":"https://api.github.com/repos/dotcloud/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotcloud/docker/downloads","issues_url":"https://api.github.com/repos/dotcloud/docker/issues{/number}","pulls_url":"https://api.github.com/repos/dotcloud/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dotcloud/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dotcloud/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotcloud/docker/labels{/name}","releases_url":"https://api.github.com/repos/dotcloud/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2014-07-02T16:41:48Z","pushed_at":"2014-07-02T17:16:27Z","git_url":"git://github.com/dotcloud/docker.git","ssh_url":"git@github.com:dotcloud/docker.git","clone_url":"https://github.com/dotcloud/docker.git","svn_url":"https://github.com/dotcloud/docker","homepage":"http://www.docker.com","size":113008,"stargazers_count":13332,"watchers_count":13332,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2345,"mirror_url":null,"open_issues_count":660,"forks":2345,"open_issues":660,"watchers":13332,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6662"},"html":{"href":"https://github.com/dotcloud/docker/pull/6662"},"issue":{"href":"https://api.github.com/repos/dotcloud/docker/issues/6662"},"comments":{"href":"https://api.github.com/repos/dotcloud/docker/issues/6662/comments"},"review_comments":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6662/comments"},"review_comment":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6662/commits"},"statuses":{"href":"https://api.github.com/repos/dotcloud/docker/statuses/06a63dfaf2b5f336a15135f2d4a510cab3a9ae4a"}}}}