{"action":"created","comment":{"url":"https://api.github.com/repos/docker/distribution/pulls/comments/31759618","id":31759618,"diff_hunk":"@@ -0,0 +1,15 @@\n+package checks\n+\n+import (\n+\t\"testing\"\n+)\n+\n+func TestFileChecker(t *testing.T) {\n+\tif checker := FileChecker(\"/tmp\"); checker.Check() == nil {\n+\t\tt.Errorf(\"/tmp was expected as exists\")\n+\t}\n+\n+\tif checker := FileChecker(\"NoSuchFileFromMoon\"); checker.Check() != nil {\n+\t\tt.Errorf(\"NoSuchFileFromMoon was expected as not exists, error:%v\", checker.Check())","path":"health/checks/checks_test.go","position":13,"original_position":13,"commit_id":"e6184905e194d6242b1510412000a9f2034f5357","original_commit_id":"e6184905e194d6242b1510412000a9f2034f5357","user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"body":"Save the error above, rather than running the check a second time.","created_at":"2015-06-04T20:05:05Z","updated_at":"2015-06-04T20:05:05Z","html_url":"https://github.com/docker/distribution/pull/595#discussion_r31759618","pull_request_url":"https://api.github.com/repos/docker/distribution/pulls/595","_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments/31759618"},"html":{"href":"https://github.com/docker/distribution/pull/595#discussion_r31759618"},"pull_request":{"href":"https://api.github.com/repos/docker/distribution/pulls/595"}}},"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/595","id":36912184,"html_url":"https://github.com/docker/distribution/pull/595","diff_url":"https://github.com/docker/distribution/pull/595.diff","patch_url":"https://github.com/docker/distribution/pull/595.patch","issue_url":"https://api.github.com/repos/docker/distribution/issues/595","number":595,"state":"open","locked":false,"title":"Test: add test for health/check","user":{"login":"HuKeping","id":9958621,"avatar_url":"https://avatars.githubusercontent.com/u/9958621?v=3","gravatar_id":"","url":"https://api.github.com/users/HuKeping","html_url":"https://github.com/HuKeping","followers_url":"https://api.github.com/users/HuKeping/followers","following_url":"https://api.github.com/users/HuKeping/following{/other_user}","gists_url":"https://api.github.com/users/HuKeping/gists{/gist_id}","starred_url":"https://api.github.com/users/HuKeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuKeping/subscriptions","organizations_url":"https://api.github.com/users/HuKeping/orgs","repos_url":"https://api.github.com/users/HuKeping/repos","events_url":"https://api.github.com/users/HuKeping/events{/privacy}","received_events_url":"https://api.github.com/users/HuKeping/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Hu Keping <hukeping@huawei.com>","created_at":"2015-06-04T08:25:01Z","updated_at":"2015-06-04T20:05:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f1e7aa9231dcae0cad1d2e30e1f01492db95bb5","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/distribution/milestones/8","html_url":"https://github.com/docker/distribution/milestones/Registry/2.1","labels_url":"https://api.github.com/repos/docker/distribution/milestones/8/labels","id":1026598,"number":8,"title":"Registry/2.1","description":"Items in this roadmap will be part of the registry 2.1 release.","creator":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":52,"state":"open","created_at":"2015-03-18T04:15:41Z","updated_at":"2015-06-04T18:36:15Z","due_on":"2015-06-19T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/distribution/pulls/595/commits","review_comments_url":"https://api.github.com/repos/docker/distribution/pulls/595/comments","review_comment_url":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/distribution/issues/595/comments","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/e6184905e194d6242b1510412000a9f2034f5357","head":{"label":"HuKeping:addtest","ref":"addtest","sha":"e6184905e194d6242b1510412000a9f2034f5357","user":{"login":"HuKeping","id":9958621,"avatar_url":"https://avatars.githubusercontent.com/u/9958621?v=3","gravatar_id":"","url":"https://api.github.com/users/HuKeping","html_url":"https://github.com/HuKeping","followers_url":"https://api.github.com/users/HuKeping/followers","following_url":"https://api.github.com/users/HuKeping/following{/other_user}","gists_url":"https://api.github.com/users/HuKeping/gists{/gist_id}","starred_url":"https://api.github.com/users/HuKeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuKeping/subscriptions","organizations_url":"https://api.github.com/users/HuKeping/orgs","repos_url":"https://api.github.com/users/HuKeping/repos","events_url":"https://api.github.com/users/HuKeping/events{/privacy}","received_events_url":"https://api.github.com/users/HuKeping/received_events","type":"User","site_admin":false},"repo":{"id":36853520,"name":"distribution","full_name":"HuKeping/distribution","owner":{"login":"HuKeping","id":9958621,"avatar_url":"https://avatars.githubusercontent.com/u/9958621?v=3","gravatar_id":"","url":"https://api.github.com/users/HuKeping","html_url":"https://github.com/HuKeping","followers_url":"https://api.github.com/users/HuKeping/followers","following_url":"https://api.github.com/users/HuKeping/following{/other_user}","gists_url":"https://api.github.com/users/HuKeping/gists{/gist_id}","starred_url":"https://api.github.com/users/HuKeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuKeping/subscriptions","organizations_url":"https://api.github.com/users/HuKeping/orgs","repos_url":"https://api.github.com/users/HuKeping/repos","events_url":"https://api.github.com/users/HuKeping/events{/privacy}","received_events_url":"https://api.github.com/users/HuKeping/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HuKeping/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":true,"url":"https://api.github.com/repos/HuKeping/distribution","forks_url":"https://api.github.com/repos/HuKeping/distribution/forks","keys_url":"https://api.github.com/repos/HuKeping/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HuKeping/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HuKeping/distribution/teams","hooks_url":"https://api.github.com/repos/HuKeping/distribution/hooks","issue_events_url":"https://api.github.com/repos/HuKeping/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/HuKeping/distribution/events","assignees_url":"https://api.github.com/repos/HuKeping/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/HuKeping/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/HuKeping/distribution/tags","blobs_url":"https://api.github.com/repos/HuKeping/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HuKeping/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HuKeping/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/HuKeping/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HuKeping/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/HuKeping/distribution/languages","stargazers_url":"https://api.github.com/repos/HuKeping/distribution/stargazers","contributors_url":"https://api.github.com/repos/HuKeping/distribution/contributors","subscribers_url":"https://api.github.com/repos/HuKeping/distribution/subscribers","subscription_url":"https://api.github.com/repos/HuKeping/distribution/subscription","commits_url":"https://api.github.com/repos/HuKeping/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/HuKeping/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/HuKeping/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/HuKeping/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/HuKeping/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/HuKeping/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HuKeping/distribution/merges","archive_url":"https://api.github.com/repos/HuKeping/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HuKeping/distribution/downloads","issues_url":"https://api.github.com/repos/HuKeping/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/HuKeping/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/HuKeping/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/HuKeping/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HuKeping/distribution/labels{/name}","releases_url":"https://api.github.com/repos/HuKeping/distribution/releases{/id}","created_at":"2015-06-04T06:52:16Z","updated_at":"2015-06-04T06:52:16Z","pushed_at":"2015-06-04T09:39:10Z","git_url":"git://github.com/HuKeping/distribution.git","ssh_url":"git@github.com:HuKeping/distribution.git","clone_url":"https://github.com/HuKeping/distribution.git","svn_url":"https://github.com/HuKeping/distribution","homepage":null,"size":10552,"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":"faab364ab5fc4f03b4623a9dd5f180be25b99ba3","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":28366058,"name":"distribution","full_name":"docker/distribution","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/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":false,"url":"https://api.github.com/repos/docker/distribution","forks_url":"https://api.github.com/repos/docker/distribution/forks","keys_url":"https://api.github.com/repos/docker/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/distribution/teams","hooks_url":"https://api.github.com/repos/docker/distribution/hooks","issue_events_url":"https://api.github.com/repos/docker/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/docker/distribution/events","assignees_url":"https://api.github.com/repos/docker/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/docker/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/docker/distribution/tags","blobs_url":"https://api.github.com/repos/docker/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/distribution/languages","stargazers_url":"https://api.github.com/repos/docker/distribution/stargazers","contributors_url":"https://api.github.com/repos/docker/distribution/contributors","subscribers_url":"https://api.github.com/repos/docker/distribution/subscribers","subscription_url":"https://api.github.com/repos/docker/distribution/subscription","commits_url":"https://api.github.com/repos/docker/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/docker/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/distribution/merges","archive_url":"https://api.github.com/repos/docker/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/distribution/downloads","issues_url":"https://api.github.com/repos/docker/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/docker/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/distribution/labels{/name}","releases_url":"https://api.github.com/repos/docker/distribution/releases{/id}","created_at":"2014-12-22T23:49:26Z","updated_at":"2015-06-04T16:36:24Z","pushed_at":"2015-06-04T18:32:10Z","git_url":"git://github.com/docker/distribution.git","ssh_url":"git@github.com:docker/distribution.git","clone_url":"https://github.com/docker/distribution.git","svn_url":"https://github.com/docker/distribution","homepage":null,"size":10552,"stargazers_count":558,"watchers_count":558,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":207,"mirror_url":null,"open_issues_count":129,"forks":207,"open_issues":129,"watchers":558,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/595"},"html":{"href":"https://github.com/docker/distribution/pull/595"},"issue":{"href":"https://api.github.com/repos/docker/distribution/issues/595"},"comments":{"href":"https://api.github.com/repos/docker/distribution/issues/595/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/distribution/pulls/595/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/distribution/pulls/595/commits"},"statuses":{"href":"https://api.github.com/repos/docker/distribution/statuses/e6184905e194d6242b1510412000a9f2034f5357"}}}}