{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27661832","id":27661832,"diff_hunk":"@@ -206,6 +206,85 @@ func (s *fakeUpgradeStream) Headers() http.Header {\n \treturn http.Header{}\n }\n \n+func TestGetListener(t *testing.T) {\n+\tvar pf PortForwarder\n+\ttestCases := []struct {\n+\t\tHostname                string\n+\t\tProtocol                string\n+\t\tPorts                   ForwardedPort","path":"pkg/client/portforward/portforward_test.go","position":9,"original_position":9,"commit_id":"11f5f7a66ec9f22d957c13a415c3a9081f3a6e84","original_commit_id":"11f5f7a66ec9f22d957c13a415c3a9081f3a6e84","user":{"login":"akram","id":654449,"avatar_url":"https://avatars.githubusercontent.com/u/654449?v=3","gravatar_id":"","url":"https://api.github.com/users/akram","html_url":"https://github.com/akram","followers_url":"https://api.github.com/users/akram/followers","following_url":"https://api.github.com/users/akram/following{/other_user}","gists_url":"https://api.github.com/users/akram/gists{/gist_id}","starred_url":"https://api.github.com/users/akram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akram/subscriptions","organizations_url":"https://api.github.com/users/akram/orgs","repos_url":"https://api.github.com/users/akram/repos","events_url":"https://api.github.com/users/akram/events{/privacy}","received_events_url":"https://api.github.com/users/akram/received_events","type":"User","site_admin":false},"body":"OK\r\ncommit pending","created_at":"2015-04-02T14:30:43Z","updated_at":"2015-04-02T14:30:43Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278#discussion_r27661832","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/27661832"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278#discussion_r27661832"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278","id":32396794,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6278","number":6278,"state":"open","locked":false,"title":"Fixes an issue with hosts having an IPv6 address on localhost","user":{"login":"akram","id":654449,"avatar_url":"https://avatars.githubusercontent.com/u/654449?v=3","gravatar_id":"","url":"https://api.github.com/users/akram","html_url":"https://github.com/akram","followers_url":"https://api.github.com/users/akram/followers","following_url":"https://api.github.com/users/akram/following{/other_user}","gists_url":"https://api.github.com/users/akram/gists{/gist_id}","starred_url":"https://api.github.com/users/akram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akram/subscriptions","organizations_url":"https://api.github.com/users/akram/orgs","repos_url":"https://api.github.com/users/akram/repos","events_url":"https://api.github.com/users/akram/events{/privacy}","received_events_url":"https://api.github.com/users/akram/received_events","type":"User","site_admin":false},"body":"- When 'getent hosts localhost' returns '::1' the creation of the listener fails because of the port parsing which uses \":\" as a separator\r\n- Use of net.SplitHostPort() to do the job\r\n- Adding unit tests to ensure that the creation succeeds\r\n- On docker.go: adds a test on the presence the socat command which was failing silenty if not installed","created_at":"2015-04-01T08:04:02Z","updated_at":"2015-04-02T14:30:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9e70185cb11d87bf91f17ae67dd476e63b394bd","assignee":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6278/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/11f5f7a66ec9f22d957c13a415c3a9081f3a6e84","head":{"label":"akram:fix_port_forward_listner_parsing_ipv4_ipv6","ref":"fix_port_forward_listner_parsing_ipv4_ipv6","sha":"11f5f7a66ec9f22d957c13a415c3a9081f3a6e84","user":{"login":"akram","id":654449,"avatar_url":"https://avatars.githubusercontent.com/u/654449?v=3","gravatar_id":"","url":"https://api.github.com/users/akram","html_url":"https://github.com/akram","followers_url":"https://api.github.com/users/akram/followers","following_url":"https://api.github.com/users/akram/following{/other_user}","gists_url":"https://api.github.com/users/akram/gists{/gist_id}","starred_url":"https://api.github.com/users/akram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akram/subscriptions","organizations_url":"https://api.github.com/users/akram/orgs","repos_url":"https://api.github.com/users/akram/repos","events_url":"https://api.github.com/users/akram/events{/privacy}","received_events_url":"https://api.github.com/users/akram/received_events","type":"User","site_admin":false},"repo":{"id":26778492,"name":"kubernetes","full_name":"akram/kubernetes","owner":{"login":"akram","id":654449,"avatar_url":"https://avatars.githubusercontent.com/u/654449?v=3","gravatar_id":"","url":"https://api.github.com/users/akram","html_url":"https://github.com/akram","followers_url":"https://api.github.com/users/akram/followers","following_url":"https://api.github.com/users/akram/following{/other_user}","gists_url":"https://api.github.com/users/akram/gists{/gist_id}","starred_url":"https://api.github.com/users/akram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akram/subscriptions","organizations_url":"https://api.github.com/users/akram/orgs","repos_url":"https://api.github.com/users/akram/repos","events_url":"https://api.github.com/users/akram/events{/privacy}","received_events_url":"https://api.github.com/users/akram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akram/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/akram/kubernetes","forks_url":"https://api.github.com/repos/akram/kubernetes/forks","keys_url":"https://api.github.com/repos/akram/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akram/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akram/kubernetes/teams","hooks_url":"https://api.github.com/repos/akram/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/akram/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/akram/kubernetes/events","assignees_url":"https://api.github.com/repos/akram/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/akram/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/akram/kubernetes/tags","blobs_url":"https://api.github.com/repos/akram/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akram/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akram/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/akram/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akram/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/akram/kubernetes/languages","stargazers_url":"https://api.github.com/repos/akram/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/akram/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/akram/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/akram/kubernetes/subscription","commits_url":"https://api.github.com/repos/akram/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/akram/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/akram/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/akram/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/akram/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/akram/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akram/kubernetes/merges","archive_url":"https://api.github.com/repos/akram/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akram/kubernetes/downloads","issues_url":"https://api.github.com/repos/akram/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/akram/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/akram/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/akram/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akram/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/akram/kubernetes/releases{/id}","created_at":"2014-11-17T21:38:15Z","updated_at":"2015-03-12T11:05:57Z","pushed_at":"2015-04-02T09:27:59Z","git_url":"git://github.com/akram/kubernetes.git","ssh_url":"git@github.com:akram/kubernetes.git","clone_url":"https://github.com/akram/kubernetes.git","svn_url":"https://github.com/akram/kubernetes","homepage":null,"size":40226,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"a94ffc8625beb5e2a39edb01edc839cb8e59c444","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-04-02T14:19:19Z","pushed_at":"2015-04-02T14:30:37Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":128562,"stargazers_count":6860,"watchers_count":6860,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1315,"mirror_url":null,"open_issues_count":856,"forks":1315,"open_issues":856,"watchers":6860,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/6278"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6278"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6278/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/6278/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/11f5f7a66ec9f22d957c13a415c3a9081f3a6e84"}}}}