{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/41707472","id":41707472,"diff_hunk":"@@ -75,32 +75,26 @@ func (s *DockerSuite) TestStartRecordError(c *check.C) {\n \t// when container runs successfully, we should not have state.Error\n \tdockerCmd(c, \"run\", \"-d\", \"-p\", \"9999:9999\", \"--name\", \"test\", \"busybox\", \"top\")\n \tstateErr, err := inspectField(\"test\", \"State.Error\")\n-\tc.Assert(err, check.IsNil)\n-\tif stateErr != \"\" {\n-\t\tc.Fatalf(\"Expected to not have state error but got state.Error(%q)\", stateErr)\n-\t}\n+\tc.Assert(err, checker.IsNil, check.Commentf(\"stateErr: %s\", stateErr))\n+\t// Expected to not have state error\n+\tc.Assert(stateErr, checker.Equals, \"\")\n \n \t// Expect this to fail and records error because of ports conflict\n \tout, _, err := dockerCmdWithError(\"run\", \"-d\", \"--name\", \"test2\", \"-p\", \"9999:9999\", \"busybox\", \"top\")\n-\tif err == nil {\n-\t\tc.Fatalf(\"Expected error but got none, output %q\", out)\n-\t}\n+\t// Expected error but got none\n+\tc.Assert(err, checker.NotNil, check.Commentf(\"out: %s\", out))\n \n \tstateErr, err = inspectField(\"test2\", \"State.Error\")\n-\tc.Assert(err, check.IsNil)\n-\texpected := \"port is already allocated\"\n-\tif stateErr == \"\" || !strings.Contains(stateErr, expected) {\n-\t\tc.Fatalf(\"State.Error(%q) does not include %q\", stateErr, expected)\n-\t}\n+\tc.Assert(err, check.IsNil, check.Commentf(\"stateErr: %s\", stateErr))\n+\tc.Assert(stateErr, checker.Contains, \"port is already allocated\")","path":"integration-cli/docker_cli_start_test.go","position":79,"original_position":79,"commit_id":"20c62710813de6bf14178875299d4de2b3f5049c","original_commit_id":"20c62710813de6bf14178875299d4de2b3f5049c","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":"I would have kept the comment that was in `c.Fatalf` in a `check.Commentf`","created_at":"2015-10-11T08:35:12Z","updated_at":"2015-10-11T08:35:12Z","html_url":"https://github.com/docker/docker/pull/16917#discussion_r41707472","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/16917","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/41707472"},"html":{"href":"https://github.com/docker/docker/pull/16917#discussion_r41707472"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/16917"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/16917","id":47362507,"html_url":"https://github.com/docker/docker/pull/16917","diff_url":"https://github.com/docker/docker/pull/16917.diff","patch_url":"https://github.com/docker/docker/pull/16917.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/16917","number":16917,"state":"open","locked":false,"title":"use of checkers on Integration test","user":{"login":"WeiZhang555","id":1203611,"avatar_url":"https://avatars.githubusercontent.com/u/1203611?v=3","gravatar_id":"","url":"https://api.github.com/users/WeiZhang555","html_url":"https://github.com/WeiZhang555","followers_url":"https://api.github.com/users/WeiZhang555/followers","following_url":"https://api.github.com/users/WeiZhang555/following{/other_user}","gists_url":"https://api.github.com/users/WeiZhang555/gists{/gist_id}","starred_url":"https://api.github.com/users/WeiZhang555/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeiZhang555/subscriptions","organizations_url":"https://api.github.com/users/WeiZhang555/orgs","repos_url":"https://api.github.com/users/WeiZhang555/repos","events_url":"https://api.github.com/users/WeiZhang555/events{/privacy}","received_events_url":"https://api.github.com/users/WeiZhang555/received_events","type":"User","site_admin":false},"body":"Part of #16756\r\n\r\nUse c.Assert instead of condition judgement in\r\nintegration-cli/docker_cli_start_test.go\r\n\r\nSigned-off-by: Zhang Wei <zhangwei555@huawei.com>","created_at":"2015-10-11T08:21:03Z","updated_at":"2015-10-11T08:35:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2f61a1ff511566213166b973978e966355da6cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/16917/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/16917/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/16917/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/20c62710813de6bf14178875299d4de2b3f5049c","head":{"label":"WeiZhang555:start-inte","ref":"start-inte","sha":"20c62710813de6bf14178875299d4de2b3f5049c","user":{"login":"WeiZhang555","id":1203611,"avatar_url":"https://avatars.githubusercontent.com/u/1203611?v=3","gravatar_id":"","url":"https://api.github.com/users/WeiZhang555","html_url":"https://github.com/WeiZhang555","followers_url":"https://api.github.com/users/WeiZhang555/followers","following_url":"https://api.github.com/users/WeiZhang555/following{/other_user}","gists_url":"https://api.github.com/users/WeiZhang555/gists{/gist_id}","starred_url":"https://api.github.com/users/WeiZhang555/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeiZhang555/subscriptions","organizations_url":"https://api.github.com/users/WeiZhang555/orgs","repos_url":"https://api.github.com/users/WeiZhang555/repos","events_url":"https://api.github.com/users/WeiZhang555/events{/privacy}","received_events_url":"https://api.github.com/users/WeiZhang555/received_events","type":"User","site_admin":false},"repo":{"id":29129000,"name":"docker","full_name":"WeiZhang555/docker","owner":{"login":"WeiZhang555","id":1203611,"avatar_url":"https://avatars.githubusercontent.com/u/1203611?v=3","gravatar_id":"","url":"https://api.github.com/users/WeiZhang555","html_url":"https://github.com/WeiZhang555","followers_url":"https://api.github.com/users/WeiZhang555/followers","following_url":"https://api.github.com/users/WeiZhang555/following{/other_user}","gists_url":"https://api.github.com/users/WeiZhang555/gists{/gist_id}","starred_url":"https://api.github.com/users/WeiZhang555/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeiZhang555/subscriptions","organizations_url":"https://api.github.com/users/WeiZhang555/orgs","repos_url":"https://api.github.com/users/WeiZhang555/repos","events_url":"https://api.github.com/users/WeiZhang555/events{/privacy}","received_events_url":"https://api.github.com/users/WeiZhang555/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WeiZhang555/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/WeiZhang555/docker","forks_url":"https://api.github.com/repos/WeiZhang555/docker/forks","keys_url":"https://api.github.com/repos/WeiZhang555/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WeiZhang555/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WeiZhang555/docker/teams","hooks_url":"https://api.github.com/repos/WeiZhang555/docker/hooks","issue_events_url":"https://api.github.com/repos/WeiZhang555/docker/issues/events{/number}","events_url":"https://api.github.com/repos/WeiZhang555/docker/events","assignees_url":"https://api.github.com/repos/WeiZhang555/docker/assignees{/user}","branches_url":"https://api.github.com/repos/WeiZhang555/docker/branches{/branch}","tags_url":"https://api.github.com/repos/WeiZhang555/docker/tags","blobs_url":"https://api.github.com/repos/WeiZhang555/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WeiZhang555/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WeiZhang555/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/WeiZhang555/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WeiZhang555/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/WeiZhang555/docker/languages","stargazers_url":"https://api.github.com/repos/WeiZhang555/docker/stargazers","contributors_url":"https://api.github.com/repos/WeiZhang555/docker/contributors","subscribers_url":"https://api.github.com/repos/WeiZhang555/docker/subscribers","subscription_url":"https://api.github.com/repos/WeiZhang555/docker/subscription","commits_url":"https://api.github.com/repos/WeiZhang555/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/WeiZhang555/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/WeiZhang555/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/WeiZhang555/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/WeiZhang555/docker/contents/{+path}","compare_url":"https://api.github.com/repos/WeiZhang555/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WeiZhang555/docker/merges","archive_url":"https://api.github.com/repos/WeiZhang555/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WeiZhang555/docker/downloads","issues_url":"https://api.github.com/repos/WeiZhang555/docker/issues{/number}","pulls_url":"https://api.github.com/repos/WeiZhang555/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/WeiZhang555/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/WeiZhang555/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WeiZhang555/docker/labels{/name}","releases_url":"https://api.github.com/repos/WeiZhang555/docker/releases{/id}","created_at":"2015-01-12T09:50:32Z","updated_at":"2015-04-23T10:47:58Z","pushed_at":"2015-10-11T08:15:05Z","git_url":"git://github.com/WeiZhang555/docker.git","ssh_url":"git@github.com:WeiZhang555/docker.git","clone_url":"https://github.com/WeiZhang555/docker.git","svn_url":"https://github.com/WeiZhang555/docker","homepage":"http://www.docker.com","size":69620,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"fb8217ee62edbb334c91d49a600ab3ae02afc314","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":7691631,"name":"docker","full_name":"docker/docker","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/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-10-11T08:30:14Z","pushed_at":"2015-10-11T08:21:03Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":268956,"stargazers_count":25336,"watchers_count":25336,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6653,"mirror_url":null,"open_issues_count":1109,"forks":6653,"open_issues":1109,"watchers":25336,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/16917"},"html":{"href":"https://github.com/docker/docker/pull/16917"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/16917"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/16917/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/16917/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/16917/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/20c62710813de6bf14178875299d4de2b3f5049c"}}}}