{"action":"created","comment":{"url":"https://api.github.com/repos/gofed/infra/pulls/comments/51545015","id":51545015,"diff_hunk":"@@ -0,0 +1,52 @@\n+import json\n+import os\n+import shutil\n+import tarfile\n+\n+import pytest\n+\n+from system.plugins.gosymbolextractor.extractor import GoSymbolExtractor\n+from system.helpers.artefact_schema_validator import ArtefactSchemaValidator\n+\n+\n+TESTDATA_DIR = 'testdata'\n+\n+PATHS = [\n+    'github.com/coreos/etcd/b4bddf685b26b4aa70e939445044bdeac822d042',\n+    'github.com/eBay/fabio/5e24a09752a75f30448f43773cb529e8ce02ce93',\n+    'github.com/PuerkitoBio/agora/fc5914daad197185f2b2fc1873b2084f0e86b6b4',\n+    'github.com/hectane/hectane/87062ba605491392423da3e75b1512cfe6350337',\n+    'github.com/mozilla-services/heka/149c483a52f0f4c9ea50b73805feebed1b7c45c3',\n+    'github.com/pingcap/tidb/482dc3f06c438c320e1fc64ff02a5479d2a989fb',\n+    'github.com/cznic/ql/77545ff365ff426dfab06c46d70fa77600cd55af',\n+    'github.com/google/cayley/792fe5d42c4dd4d967c3db2e30bd380fcdfb3151',\n+    'github.com/influxdata/influxdb/d771eb72f708c523bb2bec35a97f6bb83ae4ef1d',\n+    'github.com/google/martian/1afb734cc2eb3a5dab708a901ee07106a94a9186',\n+]\n+\n+\n+class TestGoSymbolExtractor(object):\n+\n+    @pytest.fixture(autouse=True)\n+    def prepare(self, request, path):\n+        self.path = os.path.join(TESTDATA_DIR, path)\n+        def cleanup():\n+            shutil.rmtree(self.path, ignore_errors=True)\n+        request.addfinalizer(cleanup)\n+        cleanup()\n+        with tarfile.open('{}.tar.gz'.format(self.path), 'r:gz') as tar:","path":"tests/test_gosymbolextractor.py","position":37,"original_position":37,"commit_id":"aa7c81fd214f52a765f7ba73a43d9b2a01439ec9","original_commit_id":"aa7c81fd214f52a765f7ba73a43d9b2a01439ec9","user":{"login":"ingvagabund","id":8055242,"avatar_url":"https://avatars.githubusercontent.com/u/8055242?v=3","gravatar_id":"","url":"https://api.github.com/users/ingvagabund","html_url":"https://github.com/ingvagabund","followers_url":"https://api.github.com/users/ingvagabund/followers","following_url":"https://api.github.com/users/ingvagabund/following{/other_user}","gists_url":"https://api.github.com/users/ingvagabund/gists{/gist_id}","starred_url":"https://api.github.com/users/ingvagabund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingvagabund/subscriptions","organizations_url":"https://api.github.com/users/ingvagabund/orgs","repos_url":"https://api.github.com/users/ingvagabund/repos","events_url":"https://api.github.com/users/ingvagabund/events{/privacy}","received_events_url":"https://api.github.com/users/ingvagabund/received_events","type":"User","site_admin":false},"body":"Can through exception. If it does, throw Internal Error with reasonable message error to know what happend.","created_at":"2016-02-02T09:45:53Z","updated_at":"2016-02-02T09:45:53Z","html_url":"https://github.com/gofed/infra/pull/16#discussion_r51545015","pull_request_url":"https://api.github.com/repos/gofed/infra/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/gofed/infra/pulls/comments/51545015"},"html":{"href":"https://github.com/gofed/infra/pull/16#discussion_r51545015"},"pull_request":{"href":"https://api.github.com/repos/gofed/infra/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/gofed/infra/pulls/16","id":57960562,"html_url":"https://github.com/gofed/infra/pull/16","diff_url":"https://github.com/gofed/infra/pull/16.diff","patch_url":"https://github.com/gofed/infra/pull/16.patch","issue_url":"https://api.github.com/repos/gofed/infra/issues/16","number":16,"state":"open","locked":false,"title":"Tests","user":{"login":"nforro","id":14923067,"avatar_url":"https://avatars.githubusercontent.com/u/14923067?v=3","gravatar_id":"","url":"https://api.github.com/users/nforro","html_url":"https://github.com/nforro","followers_url":"https://api.github.com/users/nforro/followers","following_url":"https://api.github.com/users/nforro/following{/other_user}","gists_url":"https://api.github.com/users/nforro/gists{/gist_id}","starred_url":"https://api.github.com/users/nforro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nforro/subscriptions","organizations_url":"https://api.github.com/users/nforro/orgs","repos_url":"https://api.github.com/users/nforro/repos","events_url":"https://api.github.com/users/nforro/events{/privacy}","received_events_url":"https://api.github.com/users/nforro/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-02T09:31:41Z","updated_at":"2016-02-02T09:45:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd2e333dc9bc90b3e907b56e13e4ae7442f96cce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gofed/infra/pulls/16/commits","review_comments_url":"https://api.github.com/repos/gofed/infra/pulls/16/comments","review_comment_url":"https://api.github.com/repos/gofed/infra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gofed/infra/issues/16/comments","statuses_url":"https://api.github.com/repos/gofed/infra/statuses/aa7c81fd214f52a765f7ba73a43d9b2a01439ec9","head":{"label":"nforro:tests","ref":"tests","sha":"aa7c81fd214f52a765f7ba73a43d9b2a01439ec9","user":{"login":"nforro","id":14923067,"avatar_url":"https://avatars.githubusercontent.com/u/14923067?v=3","gravatar_id":"","url":"https://api.github.com/users/nforro","html_url":"https://github.com/nforro","followers_url":"https://api.github.com/users/nforro/followers","following_url":"https://api.github.com/users/nforro/following{/other_user}","gists_url":"https://api.github.com/users/nforro/gists{/gist_id}","starred_url":"https://api.github.com/users/nforro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nforro/subscriptions","organizations_url":"https://api.github.com/users/nforro/orgs","repos_url":"https://api.github.com/users/nforro/repos","events_url":"https://api.github.com/users/nforro/events{/privacy}","received_events_url":"https://api.github.com/users/nforro/received_events","type":"User","site_admin":false},"repo":{"id":50663103,"name":"infra","full_name":"nforro/infra","owner":{"login":"nforro","id":14923067,"avatar_url":"https://avatars.githubusercontent.com/u/14923067?v=3","gravatar_id":"","url":"https://api.github.com/users/nforro","html_url":"https://github.com/nforro","followers_url":"https://api.github.com/users/nforro/followers","following_url":"https://api.github.com/users/nforro/following{/other_user}","gists_url":"https://api.github.com/users/nforro/gists{/gist_id}","starred_url":"https://api.github.com/users/nforro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nforro/subscriptions","organizations_url":"https://api.github.com/users/nforro/orgs","repos_url":"https://api.github.com/users/nforro/repos","events_url":"https://api.github.com/users/nforro/events{/privacy}","received_events_url":"https://api.github.com/users/nforro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nforro/infra","description":"Infrastructure implementation","fork":true,"url":"https://api.github.com/repos/nforro/infra","forks_url":"https://api.github.com/repos/nforro/infra/forks","keys_url":"https://api.github.com/repos/nforro/infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nforro/infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nforro/infra/teams","hooks_url":"https://api.github.com/repos/nforro/infra/hooks","issue_events_url":"https://api.github.com/repos/nforro/infra/issues/events{/number}","events_url":"https://api.github.com/repos/nforro/infra/events","assignees_url":"https://api.github.com/repos/nforro/infra/assignees{/user}","branches_url":"https://api.github.com/repos/nforro/infra/branches{/branch}","tags_url":"https://api.github.com/repos/nforro/infra/tags","blobs_url":"https://api.github.com/repos/nforro/infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nforro/infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nforro/infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/nforro/infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nforro/infra/statuses/{sha}","languages_url":"https://api.github.com/repos/nforro/infra/languages","stargazers_url":"https://api.github.com/repos/nforro/infra/stargazers","contributors_url":"https://api.github.com/repos/nforro/infra/contributors","subscribers_url":"https://api.github.com/repos/nforro/infra/subscribers","subscription_url":"https://api.github.com/repos/nforro/infra/subscription","commits_url":"https://api.github.com/repos/nforro/infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/nforro/infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/nforro/infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/nforro/infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/nforro/infra/contents/{+path}","compare_url":"https://api.github.com/repos/nforro/infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nforro/infra/merges","archive_url":"https://api.github.com/repos/nforro/infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nforro/infra/downloads","issues_url":"https://api.github.com/repos/nforro/infra/issues{/number}","pulls_url":"https://api.github.com/repos/nforro/infra/pulls{/number}","milestones_url":"https://api.github.com/repos/nforro/infra/milestones{/number}","notifications_url":"https://api.github.com/repos/nforro/infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nforro/infra/labels{/name}","releases_url":"https://api.github.com/repos/nforro/infra/releases{/id}","deployments_url":"https://api.github.com/repos/nforro/infra/deployments","created_at":"2016-01-29T13:10:56Z","updated_at":"2016-01-29T13:10:56Z","pushed_at":"2016-02-02T09:30:07Z","git_url":"git://github.com/nforro/infra.git","ssh_url":"git@github.com:nforro/infra.git","clone_url":"https://github.com/nforro/infra.git","svn_url":"https://github.com/nforro/infra","homepage":null,"size":1778,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"gofed:master","ref":"master","sha":"76d9daa361a8bdfbf587f0dcd853be3e791965b4","user":{"login":"gofed","id":14820221,"avatar_url":"https://avatars.githubusercontent.com/u/14820221?v=3","gravatar_id":"","url":"https://api.github.com/users/gofed","html_url":"https://github.com/gofed","followers_url":"https://api.github.com/users/gofed/followers","following_url":"https://api.github.com/users/gofed/following{/other_user}","gists_url":"https://api.github.com/users/gofed/gists{/gist_id}","starred_url":"https://api.github.com/users/gofed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gofed/subscriptions","organizations_url":"https://api.github.com/users/gofed/orgs","repos_url":"https://api.github.com/users/gofed/repos","events_url":"https://api.github.com/users/gofed/events{/privacy}","received_events_url":"https://api.github.com/users/gofed/received_events","type":"Organization","site_admin":false},"repo":{"id":48703326,"name":"infra","full_name":"gofed/infra","owner":{"login":"gofed","id":14820221,"avatar_url":"https://avatars.githubusercontent.com/u/14820221?v=3","gravatar_id":"","url":"https://api.github.com/users/gofed","html_url":"https://github.com/gofed","followers_url":"https://api.github.com/users/gofed/followers","following_url":"https://api.github.com/users/gofed/following{/other_user}","gists_url":"https://api.github.com/users/gofed/gists{/gist_id}","starred_url":"https://api.github.com/users/gofed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gofed/subscriptions","organizations_url":"https://api.github.com/users/gofed/orgs","repos_url":"https://api.github.com/users/gofed/repos","events_url":"https://api.github.com/users/gofed/events{/privacy}","received_events_url":"https://api.github.com/users/gofed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gofed/infra","description":"Infrastructure implementation","fork":false,"url":"https://api.github.com/repos/gofed/infra","forks_url":"https://api.github.com/repos/gofed/infra/forks","keys_url":"https://api.github.com/repos/gofed/infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gofed/infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gofed/infra/teams","hooks_url":"https://api.github.com/repos/gofed/infra/hooks","issue_events_url":"https://api.github.com/repos/gofed/infra/issues/events{/number}","events_url":"https://api.github.com/repos/gofed/infra/events","assignees_url":"https://api.github.com/repos/gofed/infra/assignees{/user}","branches_url":"https://api.github.com/repos/gofed/infra/branches{/branch}","tags_url":"https://api.github.com/repos/gofed/infra/tags","blobs_url":"https://api.github.com/repos/gofed/infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gofed/infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gofed/infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/gofed/infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gofed/infra/statuses/{sha}","languages_url":"https://api.github.com/repos/gofed/infra/languages","stargazers_url":"https://api.github.com/repos/gofed/infra/stargazers","contributors_url":"https://api.github.com/repos/gofed/infra/contributors","subscribers_url":"https://api.github.com/repos/gofed/infra/subscribers","subscription_url":"https://api.github.com/repos/gofed/infra/subscription","commits_url":"https://api.github.com/repos/gofed/infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/gofed/infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/gofed/infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/gofed/infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/gofed/infra/contents/{+path}","compare_url":"https://api.github.com/repos/gofed/infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gofed/infra/merges","archive_url":"https://api.github.com/repos/gofed/infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gofed/infra/downloads","issues_url":"https://api.github.com/repos/gofed/infra/issues{/number}","pulls_url":"https://api.github.com/repos/gofed/infra/pulls{/number}","milestones_url":"https://api.github.com/repos/gofed/infra/milestones{/number}","notifications_url":"https://api.github.com/repos/gofed/infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gofed/infra/labels{/name}","releases_url":"https://api.github.com/repos/gofed/infra/releases{/id}","deployments_url":"https://api.github.com/repos/gofed/infra/deployments","created_at":"2015-12-28T17:08:28Z","updated_at":"2016-01-14T10:06:12Z","pushed_at":"2016-02-02T09:31:41Z","git_url":"git://github.com/gofed/infra.git","ssh_url":"git@github.com:gofed/infra.git","clone_url":"https://github.com/gofed/infra.git","svn_url":"https://github.com/gofed/infra","homepage":null,"size":1773,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":9,"forks":3,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gofed/infra/pulls/16"},"html":{"href":"https://github.com/gofed/infra/pull/16"},"issue":{"href":"https://api.github.com/repos/gofed/infra/issues/16"},"comments":{"href":"https://api.github.com/repos/gofed/infra/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/gofed/infra/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/gofed/infra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gofed/infra/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/gofed/infra/statuses/aa7c81fd214f52a765f7ba73a43d9b2a01439ec9"}}}}