{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/mantle/pulls/comments/31089316","id":31089316,"diff_hunk":"@@ -38,3 +40,20 @@ type Cluster interface {\n \tGetDiscoveryURL(size int) (string, error)\n \tDestroy() error\n }\n+\n+// TestCluster embedds a Cluster to provide platform independant helper\n+// methods.\n+type TestCluster struct {\n+\tName string\n+\tCluster\n+}\n+\n+// run a registered NativeFunc on a remote machine\n+func (t *TestCluster) RunNative(funcName string, m Machine) error {\n+\t// scp and execute kolet on remote machine\n+\tb, err := m.SSH(fmt.Sprintf(\"./kolet run \\\"%v\\\" \\\"%v\\\"\", t.Name, funcName))","path":"platform/platform.go","position":24,"original_position":24,"commit_id":"3175005d28e1164c5fdb87e63bac9a00ee7bcdd8","original_commit_id":"3175005d28e1164c5fdb87e63bac9a00ee7bcdd8","user":{"login":"marineam","id":153640,"avatar_url":"https://avatars.githubusercontent.com/u/153640?v=3","gravatar_id":"","url":"https://api.github.com/users/marineam","html_url":"https://github.com/marineam","followers_url":"https://api.github.com/users/marineam/followers","following_url":"https://api.github.com/users/marineam/following{/other_user}","gists_url":"https://api.github.com/users/marineam/gists{/gist_id}","starred_url":"https://api.github.com/users/marineam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marineam/subscriptions","organizations_url":"https://api.github.com/users/marineam/orgs","repos_url":"https://api.github.com/users/marineam/repos","events_url":"https://api.github.com/users/marineam/events{/privacy}","received_events_url":"https://api.github.com/users/marineam/received_events","type":"User","site_admin":false},"body":"how about `%q` instead of manually escaping?","created_at":"2015-05-26T23:13:23Z","updated_at":"2015-05-26T23:13:23Z","html_url":"https://github.com/coreos/mantle/pull/50#discussion_r31089316","pull_request_url":"https://api.github.com/repos/coreos/mantle/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/coreos/mantle/pulls/comments/31089316"},"html":{"href":"https://github.com/coreos/mantle/pull/50#discussion_r31089316"},"pull_request":{"href":"https://api.github.com/repos/coreos/mantle/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/mantle/pulls/50","id":36073147,"html_url":"https://github.com/coreos/mantle/pull/50","diff_url":"https://github.com/coreos/mantle/pull/50.diff","patch_url":"https://github.com/coreos/mantle/pull/50.patch","issue_url":"https://api.github.com/repos/coreos/mantle/issues/50","number":50,"state":"open","locked":false,"title":"kolet: add support for native code in kola tests","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"body":"Kolet binaries are dropped onto newly created machines by the test harness and allow for running native helper or test functions within a test.\r\n\r\nTests can now define native functions it would like to have available. These tests can be run through the ugly closure passed along with the cluster. This closure is used over a struct + method to prevent an import cycle.\r\n\r\nThis functionality is useful in porting coretest into kola in future PRs.\r\n\r\nRight now kolalet binaries are just expected to be in the working dir from which kola is run. Once kolet is in overlay kolet binaries will be in a standard location.","created_at":"2015-05-22T22:12:54Z","updated_at":"2015-05-26T23:13:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b3145971a352863bbcb42f8fffcf9f6d1aeff17","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/mantle/pulls/50/commits","review_comments_url":"https://api.github.com/repos/coreos/mantle/pulls/50/comments","review_comment_url":"https://api.github.com/repos/coreos/mantle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/mantle/issues/50/comments","statuses_url":"https://api.github.com/repos/coreos/mantle/statuses/3175005d28e1164c5fdb87e63bac9a00ee7bcdd8","head":{"label":"pbx0:kolet","ref":"kolet","sha":"3175005d28e1164c5fdb87e63bac9a00ee7bcdd8","user":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"repo":{"id":31443603,"name":"mantle","full_name":"pbx0/mantle","owner":{"login":"pbx0","id":10945781,"avatar_url":"https://avatars.githubusercontent.com/u/10945781?v=3","gravatar_id":"","url":"https://api.github.com/users/pbx0","html_url":"https://github.com/pbx0","followers_url":"https://api.github.com/users/pbx0/followers","following_url":"https://api.github.com/users/pbx0/following{/other_user}","gists_url":"https://api.github.com/users/pbx0/gists{/gist_id}","starred_url":"https://api.github.com/users/pbx0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbx0/subscriptions","organizations_url":"https://api.github.com/users/pbx0/orgs","repos_url":"https://api.github.com/users/pbx0/repos","events_url":"https://api.github.com/users/pbx0/events{/privacy}","received_events_url":"https://api.github.com/users/pbx0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbx0/mantle","description":"Mantle: Gluing CoreOS together","fork":true,"url":"https://api.github.com/repos/pbx0/mantle","forks_url":"https://api.github.com/repos/pbx0/mantle/forks","keys_url":"https://api.github.com/repos/pbx0/mantle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbx0/mantle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbx0/mantle/teams","hooks_url":"https://api.github.com/repos/pbx0/mantle/hooks","issue_events_url":"https://api.github.com/repos/pbx0/mantle/issues/events{/number}","events_url":"https://api.github.com/repos/pbx0/mantle/events","assignees_url":"https://api.github.com/repos/pbx0/mantle/assignees{/user}","branches_url":"https://api.github.com/repos/pbx0/mantle/branches{/branch}","tags_url":"https://api.github.com/repos/pbx0/mantle/tags","blobs_url":"https://api.github.com/repos/pbx0/mantle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbx0/mantle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbx0/mantle/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbx0/mantle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbx0/mantle/statuses/{sha}","languages_url":"https://api.github.com/repos/pbx0/mantle/languages","stargazers_url":"https://api.github.com/repos/pbx0/mantle/stargazers","contributors_url":"https://api.github.com/repos/pbx0/mantle/contributors","subscribers_url":"https://api.github.com/repos/pbx0/mantle/subscribers","subscription_url":"https://api.github.com/repos/pbx0/mantle/subscription","commits_url":"https://api.github.com/repos/pbx0/mantle/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbx0/mantle/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbx0/mantle/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbx0/mantle/issues/comments{/number}","contents_url":"https://api.github.com/repos/pbx0/mantle/contents/{+path}","compare_url":"https://api.github.com/repos/pbx0/mantle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbx0/mantle/merges","archive_url":"https://api.github.com/repos/pbx0/mantle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbx0/mantle/downloads","issues_url":"https://api.github.com/repos/pbx0/mantle/issues{/number}","pulls_url":"https://api.github.com/repos/pbx0/mantle/pulls{/number}","milestones_url":"https://api.github.com/repos/pbx0/mantle/milestones{/number}","notifications_url":"https://api.github.com/repos/pbx0/mantle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbx0/mantle/labels{/name}","releases_url":"https://api.github.com/repos/pbx0/mantle/releases{/id}","created_at":"2015-02-27T23:22:32Z","updated_at":"2015-02-27T23:22:32Z","pushed_at":"2015-05-26T22:37:38Z","git_url":"git://github.com/pbx0/mantle.git","ssh_url":"git@github.com:pbx0/mantle.git","clone_url":"https://github.com/pbx0/mantle.git","svn_url":"https://github.com/pbx0/mantle","homepage":"","size":1353,"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":"coreos:master","ref":"master","sha":"366c0ec356c2af5736d48f84d0d7259cdba110ce","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":27562362,"name":"mantle","full_name":"coreos/mantle","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/mantle","description":"Mantle: Gluing CoreOS together","fork":false,"url":"https://api.github.com/repos/coreos/mantle","forks_url":"https://api.github.com/repos/coreos/mantle/forks","keys_url":"https://api.github.com/repos/coreos/mantle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/mantle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/mantle/teams","hooks_url":"https://api.github.com/repos/coreos/mantle/hooks","issue_events_url":"https://api.github.com/repos/coreos/mantle/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/mantle/events","assignees_url":"https://api.github.com/repos/coreos/mantle/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/mantle/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/mantle/tags","blobs_url":"https://api.github.com/repos/coreos/mantle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/mantle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/mantle/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/mantle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/mantle/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/mantle/languages","stargazers_url":"https://api.github.com/repos/coreos/mantle/stargazers","contributors_url":"https://api.github.com/repos/coreos/mantle/contributors","subscribers_url":"https://api.github.com/repos/coreos/mantle/subscribers","subscription_url":"https://api.github.com/repos/coreos/mantle/subscription","commits_url":"https://api.github.com/repos/coreos/mantle/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/mantle/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/mantle/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/mantle/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/mantle/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/mantle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/mantle/merges","archive_url":"https://api.github.com/repos/coreos/mantle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/mantle/downloads","issues_url":"https://api.github.com/repos/coreos/mantle/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/mantle/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/mantle/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/mantle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/mantle/labels{/name}","releases_url":"https://api.github.com/repos/coreos/mantle/releases{/id}","created_at":"2014-12-04T22:09:02Z","updated_at":"2015-05-07T18:08:20Z","pushed_at":"2015-05-26T22:37:38Z","git_url":"git://github.com/coreos/mantle.git","ssh_url":"git@github.com:coreos/mantle.git","clone_url":"https://github.com/coreos/mantle.git","svn_url":"https://github.com/coreos/mantle","homepage":"","size":1874,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/mantle/pulls/50"},"html":{"href":"https://github.com/coreos/mantle/pull/50"},"issue":{"href":"https://api.github.com/repos/coreos/mantle/issues/50"},"comments":{"href":"https://api.github.com/repos/coreos/mantle/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/mantle/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/mantle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/mantle/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/mantle/statuses/3175005d28e1164c5fdb87e63bac9a00ee7bcdd8"}}}}