{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/comments/185373904","pull_request_review_id":116748369,"id":185373904,"diff_hunk":"@@ -49,6 +60,12 @@ func (te *TestEnvironment) Start() (*rest.Config, error) {\n \t\t\tbreak\n \t\t}\n \t\tte.ControlPlane = integration.ControlPlane{}\n+\t\tif os.Getenv(env_Api) == \"\" {\n+\t\t\tte.ControlPlane.APIServer = &integration.APIServer{Path: bin_Api}\n+\t\t}\n+\t\tif os.Getenv(env_Etcd) == \"\" {\n+\t\t\tte.ControlPlane.Etcd = &integration.Etcd{Path: bin_Etcd}\n+\t\t}","path":"pkg/test/server.go","position":null,"original_position":43,"commit_id":"239d7712931d89800e7208ca62e90e52d1ad5dd4","original_commit_id":"1451f5948ca8e1718b7a3c0b52ffce528f11293e","user":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"body":"I wanted to encapsulate one in `TestEnvironment` and initialize it when use (only once in process). This purpose is also hoping no need to set ENV for `TEST_ASSET_KUBECTL`.\r\nIt can be done before `ControlPlane.Start()`. \r\n\r\nWe can hold this kubeCtl change until really need it at this moment. So, TEST_ENV_KUBECTL is still needed.","created_at":"2018-05-02T01:13:15Z","updated_at":"2018-05-02T01:13:15Z","html_url":"https://github.com/kubernetes-sigs/kubebuilder/pull/99#discussion_r185373904","pull_request_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/comments/185373904"},"html":{"href":"https://github.com/kubernetes-sigs/kubebuilder/pull/99#discussion_r185373904"},"pull_request":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99"}},"in_reply_to_id":185304061},"pull_request":{"url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99","id":184706341,"html_url":"https://github.com/kubernetes-sigs/kubebuilder/pull/99","diff_url":"https://github.com/kubernetes-sigs/kubebuilder/pull/99.diff","patch_url":"https://github.com/kubernetes-sigs/kubebuilder/pull/99.patch","issue_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/99","number":99,"state":"open","locked":false,"title":"Add binary path in testEnvironment for kubebuilder integration test","user":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"body":"- Set default binary path for kubctl, apiserver, etcd under \"/usr/local/kubebuilder/bin\"\r\n- Initialize ControlPlane with APIserver and Etcd of default binary path. So that TEST_ASSET Envs are not necessary.\r\n- Add KubeCtl wrapper into TestEnvironment. KubeCtl can be retrieved by asserting binary path.\r\n\r\n#50 ","created_at":"2018-04-27T19:20:57Z","updated_at":"2018-05-02T01:13:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b392d1e08a3af63e65f23a596b92ae2eeb437a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":867761741,"url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"ededed","default":false},{"id":872598588,"url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/labels/size/S","name":"size/S","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99/commits","review_comments_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99/comments","review_comment_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/99/comments","statuses_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/statuses/239d7712931d89800e7208ca62e90e52d1ad5dd4","head":{"label":"fanzhangio:issue50","ref":"issue50","sha":"239d7712931d89800e7208ca62e90e52d1ad5dd4","user":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"repo":{"id":128004650,"name":"kubebuilder","full_name":"fanzhangio/kubebuilder","owner":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fanzhangio/kubebuilder","description":"Kubebuilder","fork":true,"url":"https://api.github.com/repos/fanzhangio/kubebuilder","forks_url":"https://api.github.com/repos/fanzhangio/kubebuilder/forks","keys_url":"https://api.github.com/repos/fanzhangio/kubebuilder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fanzhangio/kubebuilder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fanzhangio/kubebuilder/teams","hooks_url":"https://api.github.com/repos/fanzhangio/kubebuilder/hooks","issue_events_url":"https://api.github.com/repos/fanzhangio/kubebuilder/issues/events{/number}","events_url":"https://api.github.com/repos/fanzhangio/kubebuilder/events","assignees_url":"https://api.github.com/repos/fanzhangio/kubebuilder/assignees{/user}","branches_url":"https://api.github.com/repos/fanzhangio/kubebuilder/branches{/branch}","tags_url":"https://api.github.com/repos/fanzhangio/kubebuilder/tags","blobs_url":"https://api.github.com/repos/fanzhangio/kubebuilder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fanzhangio/kubebuilder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fanzhangio/kubebuilder/git/refs{/sha}","trees_url":"https://api.github.com/repos/fanzhangio/kubebuilder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fanzhangio/kubebuilder/statuses/{sha}","languages_url":"https://api.github.com/repos/fanzhangio/kubebuilder/languages","stargazers_url":"https://api.github.com/repos/fanzhangio/kubebuilder/stargazers","contributors_url":"https://api.github.com/repos/fanzhangio/kubebuilder/contributors","subscribers_url":"https://api.github.com/repos/fanzhangio/kubebuilder/subscribers","subscription_url":"https://api.github.com/repos/fanzhangio/kubebuilder/subscription","commits_url":"https://api.github.com/repos/fanzhangio/kubebuilder/commits{/sha}","git_commits_url":"https://api.github.com/repos/fanzhangio/kubebuilder/git/commits{/sha}","comments_url":"https://api.github.com/repos/fanzhangio/kubebuilder/comments{/number}","issue_comment_url":"https://api.github.com/repos/fanzhangio/kubebuilder/issues/comments{/number}","contents_url":"https://api.github.com/repos/fanzhangio/kubebuilder/contents/{+path}","compare_url":"https://api.github.com/repos/fanzhangio/kubebuilder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fanzhangio/kubebuilder/merges","archive_url":"https://api.github.com/repos/fanzhangio/kubebuilder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fanzhangio/kubebuilder/downloads","issues_url":"https://api.github.com/repos/fanzhangio/kubebuilder/issues{/number}","pulls_url":"https://api.github.com/repos/fanzhangio/kubebuilder/pulls{/number}","milestones_url":"https://api.github.com/repos/fanzhangio/kubebuilder/milestones{/number}","notifications_url":"https://api.github.com/repos/fanzhangio/kubebuilder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fanzhangio/kubebuilder/labels{/name}","releases_url":"https://api.github.com/repos/fanzhangio/kubebuilder/releases{/id}","deployments_url":"https://api.github.com/repos/fanzhangio/kubebuilder/deployments","created_at":"2018-04-04T03:58:28Z","updated_at":"2018-04-27T22:23:08Z","pushed_at":"2018-05-02T01:02:14Z","git_url":"git://github.com/fanzhangio/kubebuilder.git","ssh_url":"git@github.com:fanzhangio/kubebuilder.git","clone_url":"https://github.com/fanzhangio/kubebuilder.git","svn_url":"https://github.com/fanzhangio/kubebuilder","homepage":null,"size":54022,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes-sigs:master","ref":"master","sha":"73fb5b2898be15e3f8701805194c924c0eb98132","user":{"login":"kubernetes-sigs","id":36015203,"avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"repo":{"id":125275487,"name":"kubebuilder","full_name":"kubernetes-sigs/kubebuilder","owner":{"login":"kubernetes-sigs","id":36015203,"avatar_url":"https://avatars1.githubusercontent.com/u/36015203?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-sigs","html_url":"https://github.com/kubernetes-sigs","followers_url":"https://api.github.com/users/kubernetes-sigs/followers","following_url":"https://api.github.com/users/kubernetes-sigs/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-sigs/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-sigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-sigs/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-sigs/orgs","repos_url":"https://api.github.com/users/kubernetes-sigs/repos","events_url":"https://api.github.com/users/kubernetes-sigs/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-sigs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-sigs/kubebuilder","description":"Kubebuilder","fork":false,"url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder","forks_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/forks","keys_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/teams","hooks_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/events","assignees_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/tags","blobs_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/languages","stargazers_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/subscription","commits_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/merges","archive_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/downloads","issues_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/deployments","created_at":"2018-03-14T21:26:14Z","updated_at":"2018-05-01T23:02:12Z","pushed_at":"2018-05-02T01:02:16Z","git_url":"git://github.com/kubernetes-sigs/kubebuilder.git","ssh_url":"git@github.com:kubernetes-sigs/kubebuilder.git","clone_url":"https://github.com/kubernetes-sigs/kubebuilder.git","svn_url":"https://github.com/kubernetes-sigs/kubebuilder","homepage":null,"size":54028,"stargazers_count":53,"watchers_count":53,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":13,"open_issues":26,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99"},"html":{"href":"https://github.com/kubernetes-sigs/kubebuilder/pull/99"},"issue":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/99"},"comments":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-sigs/kubebuilder/statuses/239d7712931d89800e7208ca62e90e52d1ad5dd4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fanzhangio"}}