{"action":"created","comment":{"url":"https://api.github.com/repos/gomods/athens/pulls/comments/224688075","pull_request_review_id":164115354,"id":224688075,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDY4ODA3NQ==","diff_hunk":"@@ -0,0 +1,66 @@\n+package s3\n+\n+import (\n+\t\"os\"\n+\t\"testing\"\n+\n+\t\"github.com/gomods/athens/pkg/config\"\n+\t\"github.com/gomods/athens/pkg/storage/compliance\"\n+\t\"github.com/minio/minio-go\"\n+)\n+\n+func TestBackend(t *testing.T) {\n+\tbackend := getStorage(t)\n+\tcompliance.RunTests(t, backend, backend.clear)\n+}\n+\n+func BenchmarkBackend(b *testing.B) {\n+\tbackend := getStorage(b)\n+\tcompliance.RunBenchmarks(b, backend, backend.clear)\n+}\n+\n+func (s *Storage) clear() error {\n+\tminioClient, _ := minio.New(os.Getenv(\"ATHENS_MINIO_ENDPOINT\"), \"minio\", \"minio123\", false)\n+\tdoneCh := make(chan struct{})\n+\tdefer close(doneCh)\n+\tobjectCh := minioClient.ListObjectsV2(\"gomods\", \"\", true, doneCh)\n+\tfor object := range objectCh {\n+\t\tif object.Err != nil {\n+\t\t\treturn object.Err\n+\t\t}\n+\t\tif err := minioClient.RemoveObject(\"gomods\", object.Key); err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t}\n+\treturn nil\n+}\n+\n+func getStorage(t testing.TB) *Storage {\n+\turl := os.Getenv(\"ATHENS_MINIO_ENDPOINT\")\n+\tif url == \"\" {\n+\t\tt.SkipNow()\n+\t}\n+\n+\tbackend, err := New(\n+\t\t&config.S3Config{\n+\t\t\tEndpoint:       url,\n+\t\t\tKey:            \"minio\",","path":"pkg/storage/s3/s3_test.go","position":47,"original_position":47,"commit_id":"ebd0f8d88d18dee698563ffd540e785672dddf88","original_commit_id":"ebd0f8d88d18dee698563ffd540e785672dddf88","user":{"login":"michalpristas","id":1522652,"node_id":"MDQ6VXNlcjE1MjI2NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1522652?v=4","gravatar_id":"","url":"https://api.github.com/users/michalpristas","html_url":"https://github.com/michalpristas","followers_url":"https://api.github.com/users/michalpristas/followers","following_url":"https://api.github.com/users/michalpristas/following{/other_user}","gists_url":"https://api.github.com/users/michalpristas/gists{/gist_id}","starred_url":"https://api.github.com/users/michalpristas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalpristas/subscriptions","organizations_url":"https://api.github.com/users/michalpristas/orgs","repos_url":"https://api.github.com/users/michalpristas/repos","events_url":"https://api.github.com/users/michalpristas/events{/privacy}","received_events_url":"https://api.github.com/users/michalpristas/received_events","type":"User","site_admin":false},"body":"same thing, s3 storage with minio config. confusing","created_at":"2018-10-12T07:02:12Z","updated_at":"2018-10-12T07:06:48Z","html_url":"https://github.com/gomods/athens/pull/750#discussion_r224688075","pull_request_url":"https://api.github.com/repos/gomods/athens/pulls/750","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments/224688075"},"html":{"href":"https://github.com/gomods/athens/pull/750#discussion_r224688075"},"pull_request":{"href":"https://api.github.com/repos/gomods/athens/pulls/750"}}},"pull_request":{"url":"https://api.github.com/repos/gomods/athens/pulls/750","id":220840229,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODQwMjI5","html_url":"https://github.com/gomods/athens/pull/750","diff_url":"https://github.com/gomods/athens/pull/750.diff","patch_url":"https://github.com/gomods/athens/pull/750.patch","issue_url":"https://api.github.com/repos/gomods/athens/issues/750","number":750,"state":"open","locked":false,"title":"Implement storage.Backend for S3 storage","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"body":"**What is the problem I am trying to address?**\r\n\r\nMissing s3 integration\r\n\r\n**How is the fix applied?**\r\n\r\nIntegrated S3 storage that is compatiblewith storage.Backend interface. For unit test minio is used to mock AWS service. Also fixed tests for minio that where skiped after #727 because of missing env variable\r\n\r\nFixes #704 \r\n\r\n","created_at":"2018-10-05T22:34:18Z","updated_at":"2018-10-12T07:06:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84d531f6f4a34b6f35cb2c23b0572f58944dbaa2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gomods/athens/pulls/750/commits","review_comments_url":"https://api.github.com/repos/gomods/athens/pulls/750/comments","review_comment_url":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gomods/athens/issues/750/comments","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/ebd0f8d88d18dee698563ffd540e785672dddf88","head":{"label":"t-tomalak:704-s3storage","ref":"704-s3storage","sha":"ebd0f8d88d18dee698563ffd540e785672dddf88","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"repo":{"id":151239225,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyMzkyMjU=","name":"athens","full_name":"t-tomalak/athens","private":false,"owner":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"html_url":"https://github.com/t-tomalak/athens","description":"A Go module datastore and proxy","fork":true,"url":"https://api.github.com/repos/t-tomalak/athens","forks_url":"https://api.github.com/repos/t-tomalak/athens/forks","keys_url":"https://api.github.com/repos/t-tomalak/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t-tomalak/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t-tomalak/athens/teams","hooks_url":"https://api.github.com/repos/t-tomalak/athens/hooks","issue_events_url":"https://api.github.com/repos/t-tomalak/athens/issues/events{/number}","events_url":"https://api.github.com/repos/t-tomalak/athens/events","assignees_url":"https://api.github.com/repos/t-tomalak/athens/assignees{/user}","branches_url":"https://api.github.com/repos/t-tomalak/athens/branches{/branch}","tags_url":"https://api.github.com/repos/t-tomalak/athens/tags","blobs_url":"https://api.github.com/repos/t-tomalak/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t-tomalak/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t-tomalak/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/t-tomalak/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t-tomalak/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/t-tomalak/athens/languages","stargazers_url":"https://api.github.com/repos/t-tomalak/athens/stargazers","contributors_url":"https://api.github.com/repos/t-tomalak/athens/contributors","subscribers_url":"https://api.github.com/repos/t-tomalak/athens/subscribers","subscription_url":"https://api.github.com/repos/t-tomalak/athens/subscription","commits_url":"https://api.github.com/repos/t-tomalak/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/t-tomalak/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/t-tomalak/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/t-tomalak/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/t-tomalak/athens/contents/{+path}","compare_url":"https://api.github.com/repos/t-tomalak/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t-tomalak/athens/merges","archive_url":"https://api.github.com/repos/t-tomalak/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t-tomalak/athens/downloads","issues_url":"https://api.github.com/repos/t-tomalak/athens/issues{/number}","pulls_url":"https://api.github.com/repos/t-tomalak/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/t-tomalak/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/t-tomalak/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t-tomalak/athens/labels{/name}","releases_url":"https://api.github.com/repos/t-tomalak/athens/releases{/id}","deployments_url":"https://api.github.com/repos/t-tomalak/athens/deployments","created_at":"2018-10-02T10:47:12Z","updated_at":"2018-10-02T10:47:15Z","pushed_at":"2018-10-11T20:22:10Z","git_url":"git://github.com/t-tomalak/athens.git","ssh_url":"git@github.com:t-tomalak/athens.git","clone_url":"https://github.com/t-tomalak/athens.git","svn_url":"https://github.com/t-tomalak/athens","homepage":"https://docs.gomods.io","size":51469,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gomods:master","ref":"master","sha":"2768c58d7bd70d2b9f0b8dd85d34c8ca6e046436","user":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"repo":{"id":122872932,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI4NzI5MzI=","name":"athens","full_name":"gomods/athens","private":false,"owner":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gomods/athens","description":"A Go module datastore and proxy","fork":false,"url":"https://api.github.com/repos/gomods/athens","forks_url":"https://api.github.com/repos/gomods/athens/forks","keys_url":"https://api.github.com/repos/gomods/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gomods/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gomods/athens/teams","hooks_url":"https://api.github.com/repos/gomods/athens/hooks","issue_events_url":"https://api.github.com/repos/gomods/athens/issues/events{/number}","events_url":"https://api.github.com/repos/gomods/athens/events","assignees_url":"https://api.github.com/repos/gomods/athens/assignees{/user}","branches_url":"https://api.github.com/repos/gomods/athens/branches{/branch}","tags_url":"https://api.github.com/repos/gomods/athens/tags","blobs_url":"https://api.github.com/repos/gomods/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gomods/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gomods/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/gomods/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/gomods/athens/languages","stargazers_url":"https://api.github.com/repos/gomods/athens/stargazers","contributors_url":"https://api.github.com/repos/gomods/athens/contributors","subscribers_url":"https://api.github.com/repos/gomods/athens/subscribers","subscription_url":"https://api.github.com/repos/gomods/athens/subscription","commits_url":"https://api.github.com/repos/gomods/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/gomods/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/gomods/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/gomods/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/gomods/athens/contents/{+path}","compare_url":"https://api.github.com/repos/gomods/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gomods/athens/merges","archive_url":"https://api.github.com/repos/gomods/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gomods/athens/downloads","issues_url":"https://api.github.com/repos/gomods/athens/issues{/number}","pulls_url":"https://api.github.com/repos/gomods/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/gomods/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/gomods/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gomods/athens/labels{/name}","releases_url":"https://api.github.com/repos/gomods/athens/releases{/id}","deployments_url":"https://api.github.com/repos/gomods/athens/deployments","created_at":"2018-02-25T20:19:41Z","updated_at":"2018-10-12T03:19:59Z","pushed_at":"2018-10-11T23:28:53Z","git_url":"git://github.com/gomods/athens.git","ssh_url":"git@github.com:gomods/athens.git","clone_url":"https://github.com/gomods/athens.git","svn_url":"https://github.com/gomods/athens","homepage":"https://docs.gomods.io","size":51447,"stargazers_count":1111,"watchers_count":1111,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":118,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":118,"open_issues":81,"watchers":1111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/750"},"html":{"href":"https://github.com/gomods/athens/pull/750"},"issue":{"href":"https://api.github.com/repos/gomods/athens/issues/750"},"comments":{"href":"https://api.github.com/repos/gomods/athens/issues/750/comments"},"review_comments":{"href":"https://api.github.com/repos/gomods/athens/pulls/750/comments"},"review_comment":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gomods/athens/pulls/750/commits"},"statuses":{"href":"https://api.github.com/repos/gomods/athens/statuses/ebd0f8d88d18dee698563ffd540e785672dddf88"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"michalpristas"}}