{"action":"created","comment":{"url":"https://api.github.com/repos/tsenart/vegeta/pulls/comments/201645338","pull_request_review_id":136184855,"id":201645338,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTY0NTMzOA==","diff_hunk":"@@ -0,0 +1,118 @@\n+package resolver\n+\n+import (\n+\t\"net\"\n+\t\"net/http\"\n+\t\"testing\"\n+)\n+\n+func TestResolve8888(t *testing.T) {\n+\tr, err := NewResolver([]string{\"8.8.8.8:53\"})\n+\tif err != nil {\n+\t\tt.FailNow()\n+\t}\n+\n+\tnet.DefaultResolver = r\n+\n+\tresp, err := http.Get(\"https://www.google.com/\")\n+\n+\tif err != nil {\n+\t\tt.Logf(\"error from http.Get(): %s\", err)\n+\t\tt.FailNow()\n+\t}\n+\n+\tresp.Body.Close()\n+}\n+\n+func TestResolveAddresses(t *testing.T) {\n+\ttable := map[string]struct {\n+\t\tinput          []string\n+\t\twant           []string\n+\t\texpectError    bool\n+\t\texpectMismatch bool\n+\t}{\n+\t\t\"Good list\": {\n+\t\t\tinput: []string{\n+\t\t\t\t\"8.8.8.8:53\",\n+\t\t\t\t\"9.9.9.9:1234\",\n+\t\t\t\t\"2.3.4.5\",\n+\t\t\t},\n+\t\t\twant: []string{\n+\t\t\t\t\"8.8.8.8:53\",\n+\t\t\t\t\"9.9.9.9:1234\",\n+\t\t\t\t\"2.3.4.5:53\",\n+\t\t\t},\n+\t\t\texpectError:    false,\n+\t\t\texpectMismatch: false,\n+\t\t},\n+\t\t\"Mismatch list\": {\n+\t\t\tinput: []string{\n+\t\t\t\t\"9.9.9.9:1234\",\n+\t\t\t},\n+\t\t\twant: []string{\n+\t\t\t\t\"9.9.9.9:53\",\n+\t\t\t},\n+\t\t\texpectError:    false,\n+\t\t\texpectMismatch: true,\n+\t\t},\n+\t\t\"Parse error list\": {\n+\t\t\tinput: []string{\n+\t\t\t\t\"abcd.com:53\",\n+\t\t\t},\n+\t\t\texpectError: true,\n+\t\t},\n+\t}\n+\tfor subtest, tdata := range table {\n+\t\tt.Run(subtest, func(t *testing.T) {","path":"resolver/resolver_test.go","position":66,"original_position":66,"commit_id":"46da9693c905e3398d4822073d60a226b0d08216","original_commit_id":"46da9693c905e3398d4822073d60a226b0d08216","user":{"login":"nathanejohnson","id":1360240,"node_id":"MDQ6VXNlcjEzNjAyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1360240?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanejohnson","html_url":"https://github.com/nathanejohnson","followers_url":"https://api.github.com/users/nathanejohnson/followers","following_url":"https://api.github.com/users/nathanejohnson/following{/other_user}","gists_url":"https://api.github.com/users/nathanejohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanejohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanejohnson/subscriptions","organizations_url":"https://api.github.com/users/nathanejohnson/orgs","repos_url":"https://api.github.com/users/nathanejohnson/repos","events_url":"https://api.github.com/users/nathanejohnson/events{/privacy}","received_events_url":"https://api.github.com/users/nathanejohnson/received_events","type":"User","site_admin":false},"body":"why?","created_at":"2018-07-11T10:47:26Z","updated_at":"2018-07-11T10:47:27Z","html_url":"https://github.com/tsenart/vegeta/pull/308#discussion_r201645338","pull_request_url":"https://api.github.com/repos/tsenart/vegeta/pulls/308","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/comments/201645338"},"html":{"href":"https://github.com/tsenart/vegeta/pull/308#discussion_r201645338"},"pull_request":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/308"}},"in_reply_to_id":201601181},"pull_request":{"url":"https://api.github.com/repos/tsenart/vegeta/pulls/308","id":200529737,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTI5NzM3","html_url":"https://github.com/tsenart/vegeta/pull/308","diff_url":"https://github.com/tsenart/vegeta/pull/308.diff","patch_url":"https://github.com/tsenart/vegeta/pull/308.patch","issue_url":"https://api.github.com/repos/tsenart/vegeta/issues/308","number":308,"state":"open","locked":false,"title":"attack: Add -resolvers flag to command","user":{"login":"nathanejohnson","id":1360240,"node_id":"MDQ6VXNlcjEzNjAyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1360240?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanejohnson","html_url":"https://github.com/nathanejohnson","followers_url":"https://api.github.com/users/nathanejohnson/followers","following_url":"https://api.github.com/users/nathanejohnson/following{/other_user}","gists_url":"https://api.github.com/users/nathanejohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanejohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanejohnson/subscriptions","organizations_url":"https://api.github.com/users/nathanejohnson/orgs","repos_url":"https://api.github.com/users/nathanejohnson/repos","events_url":"https://api.github.com/users/nathanejohnson/events{/privacy}","received_events_url":"https://api.github.com/users/nathanejohnson/received_events","type":"User","site_admin":false},"body":"This adds the ability to override the host operating system resolver\r\nby allowing this to be specified on the command line (comma separated list).\r\n\r\nIn the event more than one is specified, the resolvers are tried in order in a round robin manner.\r\n\r\n#### Background\r\n\r\nIn some situations it is desirable to override the default host resolver and use a separate host for DNS resolution.  This adds the option to specify the dns server on the command line.\r\n\r\n#### Checklist\r\n\r\n- [x] Git commit messages conform to [community standards](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).\r\n- [x] Each Git commit represents meaningful milestones or atomic units of work.\r\n- [x] Changed or added code is covered by appropriate tests.\r\n","created_at":"2018-07-10T21:32:38Z","updated_at":"2018-07-11T10:47:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8013667cebcd6777491ef2f283fcd39ae864bc47","assignee":null,"assignees":[],"requested_reviewers":[{"login":"xla","id":1585,"node_id":"MDQ6VXNlcjE1ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/1585?v=4","gravatar_id":"","url":"https://api.github.com/users/xla","html_url":"https://github.com/xla","followers_url":"https://api.github.com/users/xla/followers","following_url":"https://api.github.com/users/xla/following{/other_user}","gists_url":"https://api.github.com/users/xla/gists{/gist_id}","starred_url":"https://api.github.com/users/xla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xla/subscriptions","organizations_url":"https://api.github.com/users/xla/orgs","repos_url":"https://api.github.com/users/xla/repos","events_url":"https://api.github.com/users/xla/events{/privacy}","received_events_url":"https://api.github.com/users/xla/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tsenart/vegeta/pulls/308/commits","review_comments_url":"https://api.github.com/repos/tsenart/vegeta/pulls/308/comments","review_comment_url":"https://api.github.com/repos/tsenart/vegeta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tsenart/vegeta/issues/308/comments","statuses_url":"https://api.github.com/repos/tsenart/vegeta/statuses/46da9693c905e3398d4822073d60a226b0d08216","head":{"label":"nathanejohnson:feature/override_resolvers","ref":"feature/override_resolvers","sha":"46da9693c905e3398d4822073d60a226b0d08216","user":{"login":"nathanejohnson","id":1360240,"node_id":"MDQ6VXNlcjEzNjAyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1360240?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanejohnson","html_url":"https://github.com/nathanejohnson","followers_url":"https://api.github.com/users/nathanejohnson/followers","following_url":"https://api.github.com/users/nathanejohnson/following{/other_user}","gists_url":"https://api.github.com/users/nathanejohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanejohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanejohnson/subscriptions","organizations_url":"https://api.github.com/users/nathanejohnson/orgs","repos_url":"https://api.github.com/users/nathanejohnson/repos","events_url":"https://api.github.com/users/nathanejohnson/events{/privacy}","received_events_url":"https://api.github.com/users/nathanejohnson/received_events","type":"User","site_admin":false},"repo":{"id":140446806,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA0NDY4MDY=","name":"vegeta","full_name":"nathanejohnson/vegeta","owner":{"login":"nathanejohnson","id":1360240,"node_id":"MDQ6VXNlcjEzNjAyNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/1360240?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanejohnson","html_url":"https://github.com/nathanejohnson","followers_url":"https://api.github.com/users/nathanejohnson/followers","following_url":"https://api.github.com/users/nathanejohnson/following{/other_user}","gists_url":"https://api.github.com/users/nathanejohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanejohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanejohnson/subscriptions","organizations_url":"https://api.github.com/users/nathanejohnson/orgs","repos_url":"https://api.github.com/users/nathanejohnson/repos","events_url":"https://api.github.com/users/nathanejohnson/events{/privacy}","received_events_url":"https://api.github.com/users/nathanejohnson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nathanejohnson/vegeta","description":"HTTP load testing tool and library. It's over 9000!","fork":true,"url":"https://api.github.com/repos/nathanejohnson/vegeta","forks_url":"https://api.github.com/repos/nathanejohnson/vegeta/forks","keys_url":"https://api.github.com/repos/nathanejohnson/vegeta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nathanejohnson/vegeta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nathanejohnson/vegeta/teams","hooks_url":"https://api.github.com/repos/nathanejohnson/vegeta/hooks","issue_events_url":"https://api.github.com/repos/nathanejohnson/vegeta/issues/events{/number}","events_url":"https://api.github.com/repos/nathanejohnson/vegeta/events","assignees_url":"https://api.github.com/repos/nathanejohnson/vegeta/assignees{/user}","branches_url":"https://api.github.com/repos/nathanejohnson/vegeta/branches{/branch}","tags_url":"https://api.github.com/repos/nathanejohnson/vegeta/tags","blobs_url":"https://api.github.com/repos/nathanejohnson/vegeta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nathanejohnson/vegeta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nathanejohnson/vegeta/git/refs{/sha}","trees_url":"https://api.github.com/repos/nathanejohnson/vegeta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nathanejohnson/vegeta/statuses/{sha}","languages_url":"https://api.github.com/repos/nathanejohnson/vegeta/languages","stargazers_url":"https://api.github.com/repos/nathanejohnson/vegeta/stargazers","contributors_url":"https://api.github.com/repos/nathanejohnson/vegeta/contributors","subscribers_url":"https://api.github.com/repos/nathanejohnson/vegeta/subscribers","subscription_url":"https://api.github.com/repos/nathanejohnson/vegeta/subscription","commits_url":"https://api.github.com/repos/nathanejohnson/vegeta/commits{/sha}","git_commits_url":"https://api.github.com/repos/nathanejohnson/vegeta/git/commits{/sha}","comments_url":"https://api.github.com/repos/nathanejohnson/vegeta/comments{/number}","issue_comment_url":"https://api.github.com/repos/nathanejohnson/vegeta/issues/comments{/number}","contents_url":"https://api.github.com/repos/nathanejohnson/vegeta/contents/{+path}","compare_url":"https://api.github.com/repos/nathanejohnson/vegeta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nathanejohnson/vegeta/merges","archive_url":"https://api.github.com/repos/nathanejohnson/vegeta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nathanejohnson/vegeta/downloads","issues_url":"https://api.github.com/repos/nathanejohnson/vegeta/issues{/number}","pulls_url":"https://api.github.com/repos/nathanejohnson/vegeta/pulls{/number}","milestones_url":"https://api.github.com/repos/nathanejohnson/vegeta/milestones{/number}","notifications_url":"https://api.github.com/repos/nathanejohnson/vegeta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nathanejohnson/vegeta/labels{/name}","releases_url":"https://api.github.com/repos/nathanejohnson/vegeta/releases{/id}","deployments_url":"https://api.github.com/repos/nathanejohnson/vegeta/deployments","created_at":"2018-07-10T14:44:45Z","updated_at":"2018-07-10T14:44:47Z","pushed_at":"2018-07-11T01:59:15Z","git_url":"git://github.com/nathanejohnson/vegeta.git","ssh_url":"git@github.com:nathanejohnson/vegeta.git","clone_url":"https://github.com/nathanejohnson/vegeta.git","svn_url":"https://github.com/nathanejohnson/vegeta","homepage":"http://godoc.org/github.com/tsenart/vegeta/lib","size":777,"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":"tsenart:master","ref":"master","sha":"05aff3184d73699bd6c55c8e5136dc4e1a8d6258","user":{"login":"tsenart","id":67471,"node_id":"MDQ6VXNlcjY3NDcx","avatar_url":"https://avatars2.githubusercontent.com/u/67471?v=4","gravatar_id":"","url":"https://api.github.com/users/tsenart","html_url":"https://github.com/tsenart","followers_url":"https://api.github.com/users/tsenart/followers","following_url":"https://api.github.com/users/tsenart/following{/other_user}","gists_url":"https://api.github.com/users/tsenart/gists{/gist_id}","starred_url":"https://api.github.com/users/tsenart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsenart/subscriptions","organizations_url":"https://api.github.com/users/tsenart/orgs","repos_url":"https://api.github.com/users/tsenart/repos","events_url":"https://api.github.com/users/tsenart/events{/privacy}","received_events_url":"https://api.github.com/users/tsenart/received_events","type":"User","site_admin":false},"repo":{"id":12080551,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA4MDU1MQ==","name":"vegeta","full_name":"tsenart/vegeta","owner":{"login":"tsenart","id":67471,"node_id":"MDQ6VXNlcjY3NDcx","avatar_url":"https://avatars2.githubusercontent.com/u/67471?v=4","gravatar_id":"","url":"https://api.github.com/users/tsenart","html_url":"https://github.com/tsenart","followers_url":"https://api.github.com/users/tsenart/followers","following_url":"https://api.github.com/users/tsenart/following{/other_user}","gists_url":"https://api.github.com/users/tsenart/gists{/gist_id}","starred_url":"https://api.github.com/users/tsenart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsenart/subscriptions","organizations_url":"https://api.github.com/users/tsenart/orgs","repos_url":"https://api.github.com/users/tsenart/repos","events_url":"https://api.github.com/users/tsenart/events{/privacy}","received_events_url":"https://api.github.com/users/tsenart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsenart/vegeta","description":"HTTP load testing tool and library. It's over 9000!","fork":false,"url":"https://api.github.com/repos/tsenart/vegeta","forks_url":"https://api.github.com/repos/tsenart/vegeta/forks","keys_url":"https://api.github.com/repos/tsenart/vegeta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsenart/vegeta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsenart/vegeta/teams","hooks_url":"https://api.github.com/repos/tsenart/vegeta/hooks","issue_events_url":"https://api.github.com/repos/tsenart/vegeta/issues/events{/number}","events_url":"https://api.github.com/repos/tsenart/vegeta/events","assignees_url":"https://api.github.com/repos/tsenart/vegeta/assignees{/user}","branches_url":"https://api.github.com/repos/tsenart/vegeta/branches{/branch}","tags_url":"https://api.github.com/repos/tsenart/vegeta/tags","blobs_url":"https://api.github.com/repos/tsenart/vegeta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsenart/vegeta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsenart/vegeta/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsenart/vegeta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsenart/vegeta/statuses/{sha}","languages_url":"https://api.github.com/repos/tsenart/vegeta/languages","stargazers_url":"https://api.github.com/repos/tsenart/vegeta/stargazers","contributors_url":"https://api.github.com/repos/tsenart/vegeta/contributors","subscribers_url":"https://api.github.com/repos/tsenart/vegeta/subscribers","subscription_url":"https://api.github.com/repos/tsenart/vegeta/subscription","commits_url":"https://api.github.com/repos/tsenart/vegeta/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsenart/vegeta/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsenart/vegeta/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsenart/vegeta/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsenart/vegeta/contents/{+path}","compare_url":"https://api.github.com/repos/tsenart/vegeta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsenart/vegeta/merges","archive_url":"https://api.github.com/repos/tsenart/vegeta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsenart/vegeta/downloads","issues_url":"https://api.github.com/repos/tsenart/vegeta/issues{/number}","pulls_url":"https://api.github.com/repos/tsenart/vegeta/pulls{/number}","milestones_url":"https://api.github.com/repos/tsenart/vegeta/milestones{/number}","notifications_url":"https://api.github.com/repos/tsenart/vegeta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsenart/vegeta/labels{/name}","releases_url":"https://api.github.com/repos/tsenart/vegeta/releases{/id}","deployments_url":"https://api.github.com/repos/tsenart/vegeta/deployments","created_at":"2013-08-13T11:45:21Z","updated_at":"2018-07-11T10:39:19Z","pushed_at":"2018-07-11T10:39:17Z","git_url":"git://github.com/tsenart/vegeta.git","ssh_url":"git@github.com:tsenart/vegeta.git","clone_url":"https://github.com/tsenart/vegeta.git","svn_url":"https://github.com/tsenart/vegeta","homepage":"http://godoc.org/github.com/tsenart/vegeta/lib","size":784,"stargazers_count":8254,"watchers_count":8254,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":527,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":527,"open_issues":19,"watchers":8254,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/308"},"html":{"href":"https://github.com/tsenart/vegeta/pull/308"},"issue":{"href":"https://api.github.com/repos/tsenart/vegeta/issues/308"},"comments":{"href":"https://api.github.com/repos/tsenart/vegeta/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tsenart/vegeta/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/tsenart/vegeta/statuses/46da9693c905e3398d4822073d60a226b0d08216"}},"author_association":"NONE"}}
{"actor":{"display_login":"nathanejohnson"}}