{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/28512470","id":28512470,"diff_hunk":"@@ -1,64 +1,46 @@\n package start\n \n import (\n+\t\"errors\"\n \t\"io/ioutil\"\n \t\"os\"\n+\t\"path\"\n \t\"strconv\"\n \t\"strings\"\n \t\"testing\"\n \n \t\"github.com/spf13/cobra\"\n \n-\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util\"\n-\tutilerrors \"github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors\"\n-\n \tconfigapi \"github.com/openshift/origin/pkg/cmd/server/api\"\n \tconfigapilatest \"github.com/openshift/origin/pkg/cmd/server/api/latest\"\n-\t\"github.com/openshift/origin/pkg/cmd/server/api/validation\"\n )\n \n-func TestCommandBindingListenHttp(t *testing.T) {\n-\tvalueToSet := \"http://example.org:9123\"\n-\tmasterArgs, masterCfg, masterErr, nodeArgs, nodeCfg, nodeErr := executeAllInOneCommandWithConfigs([]string{\"--listen=\" + valueToSet})\n+// this groups of methods force all the unit tests to share the same config directory\n+// the non-cert parts of the directory are cleaned up with every execution, but the certs\n+// remain in order to speed up the tests.\n+var configDir = \"\"\n \n-\tif masterErr != nil {\n-\t\tt.Fatalf(\"Unexpected error: %v\", masterErr)\n-\t}\n-\tif nodeErr != nil {\n-\t\tt.Fatalf(\"Unexpected error: %v\", nodeErr)\n+func initConfigDir() {\n+\tif len(configDir) == 0 {\n+\t\tconfigDir, _ = ioutil.TempDir(\"\", \"\")\n \t}\n+}\n \n-\tif configapi.UseTLS(masterCfg.ServingInfo) {\n-\t\tt.Errorf(\"Unexpected TLS: %v\", masterCfg.ServingInfo)\n-\t}\n-\tif configapi.UseTLS(masterCfg.AssetConfig.ServingInfo) {\n-\t\tt.Errorf(\"Unexpected TLS: %v\", masterCfg.AssetConfig.ServingInfo)\n-\t}\n-\tif configapi.UseTLS(nodeCfg.ServingInfo) {\n-\t\tt.Errorf(\"Unexpected TLS: %v\", nodeCfg.ServingInfo)\n-\t}\n+func getAllInOneConfigDir() string {\n+\treturn configDir","path":"pkg/cmd/server/start/command_test.go","position":51,"original_position":51,"commit_id":"8a9e06f23b43287901d7d6ed3ab6cdc10269bf3b","original_commit_id":"8a9e06f23b43287901d7d6ed3ab6cdc10269bf3b","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"call `initConfigDir()`?","created_at":"2015-04-16T14:11:17Z","updated_at":"2015-04-16T14:11:17Z","html_url":"https://github.com/openshift/origin/pull/1737#discussion_r28512470","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/1737","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/28512470"},"html":{"href":"https://github.com/openshift/origin/pull/1737#discussion_r28512470"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/1737"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/1737","id":33292126,"html_url":"https://github.com/openshift/origin/pull/1737","diff_url":"https://github.com/openshift/origin/pull/1737.diff","patch_url":"https://github.com/openshift/origin/pull/1737.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/1737","number":1737,"state":"open","locked":false,"title":"make openshift start --write-config take a dir","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"This changes the `--write-config` parameter to take a directory (instead of boolean).  It eliminates `--cert-dir` and always creates the certs directly in the config directory. \r\n\r\nSince it is a single directory, the master config dir can be bundled up as a secret for use in a pod.\r\n\r\n@liggitt review\r\n@sdodson fyi","created_at":"2015-04-14T19:38:51Z","updated_at":"2015-04-16T14:11:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ebcaefa81ce0e838c516603835321f0168f387b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/1737/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/1737/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/1737/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/8a9e06f23b43287901d7d6ed3ab6cdc10269bf3b","head":{"label":"deads2k:deads-openshift-start-take-dir","ref":"deads-openshift-start-take-dir","sha":"8a9e06f23b43287901d7d6ed3ab6cdc10269bf3b","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"repo":{"id":24424126,"name":"origin","full_name":"deads2k/origin","owner":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deads2k/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/deads2k/origin","forks_url":"https://api.github.com/repos/deads2k/origin/forks","keys_url":"https://api.github.com/repos/deads2k/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deads2k/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deads2k/origin/teams","hooks_url":"https://api.github.com/repos/deads2k/origin/hooks","issue_events_url":"https://api.github.com/repos/deads2k/origin/issues/events{/number}","events_url":"https://api.github.com/repos/deads2k/origin/events","assignees_url":"https://api.github.com/repos/deads2k/origin/assignees{/user}","branches_url":"https://api.github.com/repos/deads2k/origin/branches{/branch}","tags_url":"https://api.github.com/repos/deads2k/origin/tags","blobs_url":"https://api.github.com/repos/deads2k/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deads2k/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deads2k/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/deads2k/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deads2k/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/deads2k/origin/languages","stargazers_url":"https://api.github.com/repos/deads2k/origin/stargazers","contributors_url":"https://api.github.com/repos/deads2k/origin/contributors","subscribers_url":"https://api.github.com/repos/deads2k/origin/subscribers","subscription_url":"https://api.github.com/repos/deads2k/origin/subscription","commits_url":"https://api.github.com/repos/deads2k/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/deads2k/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/deads2k/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/deads2k/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/deads2k/origin/contents/{+path}","compare_url":"https://api.github.com/repos/deads2k/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deads2k/origin/merges","archive_url":"https://api.github.com/repos/deads2k/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deads2k/origin/downloads","issues_url":"https://api.github.com/repos/deads2k/origin/issues{/number}","pulls_url":"https://api.github.com/repos/deads2k/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/deads2k/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/deads2k/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deads2k/origin/labels{/name}","releases_url":"https://api.github.com/repos/deads2k/origin/releases{/id}","created_at":"2014-09-24T17:02:12Z","updated_at":"2015-04-16T12:29:51Z","pushed_at":"2015-04-16T13:58:28Z","git_url":"git://github.com/deads2k/origin.git","ssh_url":"git@github.com:deads2k/origin.git","clone_url":"https://github.com/deads2k/origin.git","svn_url":"https://github.com/deads2k/origin","homepage":"https://openshift.github.io","size":78916,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"67486ff306535724e683e90c933049a26540a992","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-04-16T13:53:50Z","pushed_at":"2015-04-16T13:58:30Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":112081,"stargazers_count":372,"watchers_count":372,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":186,"mirror_url":null,"open_issues_count":188,"forks":186,"open_issues":188,"watchers":372,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/1737"},"html":{"href":"https://github.com/openshift/origin/pull/1737"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/1737"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/1737/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/1737/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/1737/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/8a9e06f23b43287901d7d6ed3ab6cdc10269bf3b"}}}}