{"action":"created","comment":{"url":"https://api.github.com/repos/docker/engine-api/pulls/comments/52769683","id":52769683,"diff_hunk":"@@ -1,12 +1,58 @@\n package client\n \n import (\n+\t\"bytes\"\n+\t\"encoding/json\"\n+\t\"io/ioutil\"\n \t\"log\"\n+\t\"net/http\"\n+\t\"testing\"\n \t\"time\"\n \n+\t\"github.com/docker/engine-api/client/transport\"\n+\t\"github.com/docker/engine-api/types\"\n+\n \t\"golang.org/x/net/context\"\n )\n \n+func TestContainerWaitError(t *testing.T) {\n+\tclient := &Client{\n+\t\ttransport: transport.NewMockClient(nil, transport.ErrorMock(http.StatusInternalServerError, \"Server error\")),\n+\t}\n+\tcode, err := client.ContainerWait(context.Background(), \"nothing\")\n+\tif err == nil || err.Error() != \"Error response from daemon: Server error\" {\n+\t\tt.Fatalf(\"expected a Server Error, got %v\", err)\n+\t}\n+\tif code != -1 {\n+\t\tt.Fatalf(\"expected a status code equal to '1', got %d\", code)","path":"client/container_wait_test.go","position":27,"original_position":27,"commit_id":"e6db9607b586a6d907147637e22059c1002dea30","original_commit_id":"e6db9607b586a6d907147637e22059c1002dea30","user":{"login":"calavera","id":1050,"avatar_url":"https://avatars.githubusercontent.com/u/1050?v=3","gravatar_id":"","url":"https://api.github.com/users/calavera","html_url":"https://github.com/calavera","followers_url":"https://api.github.com/users/calavera/followers","following_url":"https://api.github.com/users/calavera/following{/other_user}","gists_url":"https://api.github.com/users/calavera/gists{/gist_id}","starred_url":"https://api.github.com/users/calavera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calavera/subscriptions","organizations_url":"https://api.github.com/users/calavera/orgs","repos_url":"https://api.github.com/users/calavera/repos","events_url":"https://api.github.com/users/calavera/events{/privacy}","received_events_url":"https://api.github.com/users/calavera/received_events","type":"User","site_admin":false},"body":"`expected a status code equal to '1'` I was talking about the message :wink: ","created_at":"2016-02-12T17:14:59Z","updated_at":"2016-02-12T17:14:59Z","html_url":"https://github.com/docker/engine-api/pull/86#discussion_r52769683","pull_request_url":"https://api.github.com/repos/docker/engine-api/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/docker/engine-api/pulls/comments/52769683"},"html":{"href":"https://github.com/docker/engine-api/pull/86#discussion_r52769683"},"pull_request":{"href":"https://api.github.com/repos/docker/engine-api/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/docker/engine-api/pulls/86","id":59104127,"html_url":"https://github.com/docker/engine-api/pull/86","diff_url":"https://github.com/docker/engine-api/pull/86.diff","patch_url":"https://github.com/docker/engine-api/pull/86.patch","issue_url":"https://api.github.com/repos/docker/engine-api/issues/86","number":86,"state":"open","locked":false,"title":"Add more unit tests to ContainerX","user":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"body":"Add more unit tests to client methods 🐹 :\r\n\r\n- `ContainerExport` (error case only, other cases will follow)\r\n- `ContainerList`\r\n- `ContainerLogs` (error case only, other cases will follow)\r\n- `ContainerPause`\r\n- `ContainerRemove`\r\n- `ContainerRename`\r\n- `ContainerResize`\r\n- `ContainerRestart`\r\n- `ContainerStats` (error case only, other cases will follow)\r\n- `ContainerUnpause`\r\n- `ContainerUpdate`\r\n- `ContainerWait`\r\n\r\n🐸\r\n\r\nSigned-off-by: Vincent Demeester <vincent@sbr.pm>","created_at":"2016-02-11T22:26:47Z","updated_at":"2016-02-12T17:14:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49213cddd6a32a339682805fdf22e3e6daf9d3f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/engine-api/pulls/86/commits","review_comments_url":"https://api.github.com/repos/docker/engine-api/pulls/86/comments","review_comment_url":"https://api.github.com/repos/docker/engine-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/engine-api/issues/86/comments","statuses_url":"https://api.github.com/repos/docker/engine-api/statuses/e6db9607b586a6d907147637e22059c1002dea30","head":{"label":"vdemeester:even_more_container_unit_test","ref":"even_more_container_unit_test","sha":"e6db9607b586a6d907147637e22059c1002dea30","user":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"repo":{"id":49231821,"name":"engine-api","full_name":"vdemeester/engine-api","owner":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vdemeester/engine-api","description":"Go libraries providing client and server components compatible with the Docker engine","fork":true,"url":"https://api.github.com/repos/vdemeester/engine-api","forks_url":"https://api.github.com/repos/vdemeester/engine-api/forks","keys_url":"https://api.github.com/repos/vdemeester/engine-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vdemeester/engine-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vdemeester/engine-api/teams","hooks_url":"https://api.github.com/repos/vdemeester/engine-api/hooks","issue_events_url":"https://api.github.com/repos/vdemeester/engine-api/issues/events{/number}","events_url":"https://api.github.com/repos/vdemeester/engine-api/events","assignees_url":"https://api.github.com/repos/vdemeester/engine-api/assignees{/user}","branches_url":"https://api.github.com/repos/vdemeester/engine-api/branches{/branch}","tags_url":"https://api.github.com/repos/vdemeester/engine-api/tags","blobs_url":"https://api.github.com/repos/vdemeester/engine-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vdemeester/engine-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vdemeester/engine-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vdemeester/engine-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vdemeester/engine-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vdemeester/engine-api/languages","stargazers_url":"https://api.github.com/repos/vdemeester/engine-api/stargazers","contributors_url":"https://api.github.com/repos/vdemeester/engine-api/contributors","subscribers_url":"https://api.github.com/repos/vdemeester/engine-api/subscribers","subscription_url":"https://api.github.com/repos/vdemeester/engine-api/subscription","commits_url":"https://api.github.com/repos/vdemeester/engine-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vdemeester/engine-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vdemeester/engine-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vdemeester/engine-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/vdemeester/engine-api/contents/{+path}","compare_url":"https://api.github.com/repos/vdemeester/engine-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vdemeester/engine-api/merges","archive_url":"https://api.github.com/repos/vdemeester/engine-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vdemeester/engine-api/downloads","issues_url":"https://api.github.com/repos/vdemeester/engine-api/issues{/number}","pulls_url":"https://api.github.com/repos/vdemeester/engine-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vdemeester/engine-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vdemeester/engine-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vdemeester/engine-api/labels{/name}","releases_url":"https://api.github.com/repos/vdemeester/engine-api/releases{/id}","deployments_url":"https://api.github.com/repos/vdemeester/engine-api/deployments","created_at":"2016-01-07T21:28:19Z","updated_at":"2016-01-11T21:23:57Z","pushed_at":"2016-02-12T16:56:37Z","git_url":"git://github.com/vdemeester/engine-api.git","ssh_url":"git@github.com:vdemeester/engine-api.git","clone_url":"https://github.com/vdemeester/engine-api.git","svn_url":"https://github.com/vdemeester/engine-api","homepage":"https://godoc.org/github.com/docker/engine-api","size":2254,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"d493d787d23462aceb053494ac1b62ee50561507","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":49029588,"name":"engine-api","full_name":"docker/engine-api","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/engine-api","description":"Go libraries providing client and server components compatible with the Docker engine","fork":false,"url":"https://api.github.com/repos/docker/engine-api","forks_url":"https://api.github.com/repos/docker/engine-api/forks","keys_url":"https://api.github.com/repos/docker/engine-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/engine-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/engine-api/teams","hooks_url":"https://api.github.com/repos/docker/engine-api/hooks","issue_events_url":"https://api.github.com/repos/docker/engine-api/issues/events{/number}","events_url":"https://api.github.com/repos/docker/engine-api/events","assignees_url":"https://api.github.com/repos/docker/engine-api/assignees{/user}","branches_url":"https://api.github.com/repos/docker/engine-api/branches{/branch}","tags_url":"https://api.github.com/repos/docker/engine-api/tags","blobs_url":"https://api.github.com/repos/docker/engine-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/engine-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/engine-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/engine-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/engine-api/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/engine-api/languages","stargazers_url":"https://api.github.com/repos/docker/engine-api/stargazers","contributors_url":"https://api.github.com/repos/docker/engine-api/contributors","subscribers_url":"https://api.github.com/repos/docker/engine-api/subscribers","subscription_url":"https://api.github.com/repos/docker/engine-api/subscription","commits_url":"https://api.github.com/repos/docker/engine-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/engine-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/engine-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/engine-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/engine-api/contents/{+path}","compare_url":"https://api.github.com/repos/docker/engine-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/engine-api/merges","archive_url":"https://api.github.com/repos/docker/engine-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/engine-api/downloads","issues_url":"https://api.github.com/repos/docker/engine-api/issues{/number}","pulls_url":"https://api.github.com/repos/docker/engine-api/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/engine-api/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/engine-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/engine-api/labels{/name}","releases_url":"https://api.github.com/repos/docker/engine-api/releases{/id}","deployments_url":"https://api.github.com/repos/docker/engine-api/deployments","created_at":"2016-01-04T23:28:36Z","updated_at":"2016-02-12T10:23:55Z","pushed_at":"2016-02-12T07:20:00Z","git_url":"git://github.com/docker/engine-api.git","ssh_url":"git@github.com:docker/engine-api.git","clone_url":"https://github.com/docker/engine-api.git","svn_url":"https://github.com/docker/engine-api","homepage":"https://godoc.org/github.com/docker/engine-api","size":2302,"stargazers_count":81,"watchers_count":81,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":11,"forks":42,"open_issues":11,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/engine-api/pulls/86"},"html":{"href":"https://github.com/docker/engine-api/pull/86"},"issue":{"href":"https://api.github.com/repos/docker/engine-api/issues/86"},"comments":{"href":"https://api.github.com/repos/docker/engine-api/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/engine-api/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/engine-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/engine-api/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/docker/engine-api/statuses/e6db9607b586a6d907147637e22059c1002dea30"}}}}