{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/28437719","id":28437719,"diff_hunk":"@@ -0,0 +1,83 @@\n+// Copyright 2015 CoreOS, Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package main\n+\n+import (\n+\t\"testing\"\n+\t\"time\"\n+\n+\t\"github.com/coreos/rkt/Godeps/_workspace/src/github.com/ThomasRooney/gexpect\"\n+)\n+\n+var interactiveTests = []struct {\n+\trktCmd string\n+\tsay    string\n+\texpect string\n+}{\n+\t{\n+\t\t`../bin/rkt --debug --insecure-skip-verify run docker://busybox -- -c 'echo BUSYBOX_OK'`,\n+\t\t``,\n+\t\t`BUSYBOX_OK`,\n+\t},\n+\t{\n+\t\t`../bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox`,\n+\t\t`export RET=OK; echo BUSYBOX_${RET}`,\n+\t\t`BUSYBOX_OK`,\n+\t},\n+\t{\n+\t\t`../bin/rkt --debug --insecure-skip-verify run --interactive docker://busybox -- -x`,\n+\t\t`echo BUSYBOX_OK`,\n+\t\t`+ echo BUSYBOX_OK`,\n+\t},\n+}\n+\n+func TestInteractive(t *testing.T) {\n+\tfor i, tt := range interactiveTests {\n+\t\tt.Logf(\"Running test #%v: %v\", i, tt.rktCmd)\n+\n+\t\tchild, err := gexpect.Spawn(tt.rktCmd)\n+\t\tif err != nil {\n+\t\t\tt.Fatalf(\"Cannot exec rkt #%v: %v\", i, err)\n+\t\t}\n+\t\tif tt.say != \"\" {\n+\t\t\terr = child.ExpectTimeout(\"/ #\", time.Minute*10)","path":"tests/rkt_interactive_test.go","position":55,"original_position":55,"commit_id":"0624d98d93b9b588aac58c9bc3b290f9c90f46b5","original_commit_id":"0624d98d93b9b588aac58c9bc3b290f9c90f46b5","user":{"login":"iaguis","id":507354,"avatar_url":"https://avatars.githubusercontent.com/u/507354?v=3","gravatar_id":"","url":"https://api.github.com/users/iaguis","html_url":"https://github.com/iaguis","followers_url":"https://api.github.com/users/iaguis/followers","following_url":"https://api.github.com/users/iaguis/following{/other_user}","gists_url":"https://api.github.com/users/iaguis/gists{/gist_id}","starred_url":"https://api.github.com/users/iaguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iaguis/subscriptions","organizations_url":"https://api.github.com/users/iaguis/orgs","repos_url":"https://api.github.com/users/iaguis/repos","events_url":"https://api.github.com/users/iaguis/events{/privacy}","received_events_url":"https://api.github.com/users/iaguis/received_events","type":"User","site_admin":false},"body":"Maybe 10 minutes is too much?","created_at":"2015-04-15T16:40:15Z","updated_at":"2015-04-15T16:40:15Z","html_url":"https://github.com/coreos/rkt/pull/765#discussion_r28437719","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/765","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/28437719"},"html":{"href":"https://github.com/coreos/rkt/pull/765#discussion_r28437719"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/765"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/765","id":33353581,"html_url":"https://github.com/coreos/rkt/pull/765","diff_url":"https://github.com/coreos/rkt/pull/765.diff","patch_url":"https://github.com/coreos/rkt/pull/765.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/765","number":765,"state":"open","locked":false,"title":"functional tests: new test for rkt run -interactive","user":{"login":"alban","id":27575,"avatar_url":"https://avatars.githubusercontent.com/u/27575?v=3","gravatar_id":"","url":"https://api.github.com/users/alban","html_url":"https://github.com/alban","followers_url":"https://api.github.com/users/alban/followers","following_url":"https://api.github.com/users/alban/following{/other_user}","gists_url":"https://api.github.com/users/alban/gists{/gist_id}","starred_url":"https://api.github.com/users/alban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alban/subscriptions","organizations_url":"https://api.github.com/users/alban/orgs","repos_url":"https://api.github.com/users/alban/repos","events_url":"https://api.github.com/users/alban/events{/privacy}","received_events_url":"https://api.github.com/users/alban/received_events","type":"User","site_admin":false},"body":"It contains a regression test for\r\nhttps://github.com/coreos/rkt/issues/758\r\n\r\n/cc @iaguis ","created_at":"2015-04-15T13:22:58Z","updated_at":"2015-04-15T16:40:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1017d7c2b977d0ac8ceeb7e462e305802da6857a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/765/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/765/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/765/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/0624d98d93b9b588aac58c9bc3b290f9c90f46b5","head":{"label":"endocode:alban/functests_interactive","ref":"alban/functests_interactive","sha":"0624d98d93b9b588aac58c9bc3b290f9c90f46b5","user":{"login":"endocode","id":4068543,"avatar_url":"https://avatars.githubusercontent.com/u/4068543?v=3","gravatar_id":"","url":"https://api.github.com/users/endocode","html_url":"https://github.com/endocode","followers_url":"https://api.github.com/users/endocode/followers","following_url":"https://api.github.com/users/endocode/following{/other_user}","gists_url":"https://api.github.com/users/endocode/gists{/gist_id}","starred_url":"https://api.github.com/users/endocode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endocode/subscriptions","organizations_url":"https://api.github.com/users/endocode/orgs","repos_url":"https://api.github.com/users/endocode/repos","events_url":"https://api.github.com/users/endocode/events{/privacy}","received_events_url":"https://api.github.com/users/endocode/received_events","type":"Organization","site_admin":false},"repo":{"id":28082853,"name":"rkt","full_name":"endocode/rkt","owner":{"login":"endocode","id":4068543,"avatar_url":"https://avatars.githubusercontent.com/u/4068543?v=3","gravatar_id":"","url":"https://api.github.com/users/endocode","html_url":"https://github.com/endocode","followers_url":"https://api.github.com/users/endocode/followers","following_url":"https://api.github.com/users/endocode/following{/other_user}","gists_url":"https://api.github.com/users/endocode/gists{/gist_id}","starred_url":"https://api.github.com/users/endocode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endocode/subscriptions","organizations_url":"https://api.github.com/users/endocode/orgs","repos_url":"https://api.github.com/users/endocode/repos","events_url":"https://api.github.com/users/endocode/events{/privacy}","received_events_url":"https://api.github.com/users/endocode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endocode/rkt","description":"App Container runtime","fork":true,"url":"https://api.github.com/repos/endocode/rkt","forks_url":"https://api.github.com/repos/endocode/rkt/forks","keys_url":"https://api.github.com/repos/endocode/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endocode/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endocode/rkt/teams","hooks_url":"https://api.github.com/repos/endocode/rkt/hooks","issue_events_url":"https://api.github.com/repos/endocode/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/endocode/rkt/events","assignees_url":"https://api.github.com/repos/endocode/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/endocode/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/endocode/rkt/tags","blobs_url":"https://api.github.com/repos/endocode/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endocode/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endocode/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/endocode/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endocode/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/endocode/rkt/languages","stargazers_url":"https://api.github.com/repos/endocode/rkt/stargazers","contributors_url":"https://api.github.com/repos/endocode/rkt/contributors","subscribers_url":"https://api.github.com/repos/endocode/rkt/subscribers","subscription_url":"https://api.github.com/repos/endocode/rkt/subscription","commits_url":"https://api.github.com/repos/endocode/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/endocode/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/endocode/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/endocode/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/endocode/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/endocode/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endocode/rkt/merges","archive_url":"https://api.github.com/repos/endocode/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endocode/rkt/downloads","issues_url":"https://api.github.com/repos/endocode/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/endocode/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/endocode/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/endocode/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endocode/rkt/labels{/name}","releases_url":"https://api.github.com/repos/endocode/rkt/releases{/id}","created_at":"2014-12-16T10:52:13Z","updated_at":"2015-04-13T13:12:24Z","pushed_at":"2015-04-15T16:04:25Z","git_url":"git://github.com/endocode/rkt.git","ssh_url":"git@github.com:endocode/rkt.git","clone_url":"https://github.com/endocode/rkt.git","svn_url":"https://github.com/endocode/rkt","homepage":"","size":5905,"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":"bd57b7de1d22d0bc3b40ab9b10b847c60caba095","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":26509369,"name":"rkt","full_name":"coreos/rkt","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/rkt","description":"App Container runtime","fork":false,"url":"https://api.github.com/repos/coreos/rkt","forks_url":"https://api.github.com/repos/coreos/rkt/forks","keys_url":"https://api.github.com/repos/coreos/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rkt/teams","hooks_url":"https://api.github.com/repos/coreos/rkt/hooks","issue_events_url":"https://api.github.com/repos/coreos/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rkt/events","assignees_url":"https://api.github.com/repos/coreos/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rkt/tags","blobs_url":"https://api.github.com/repos/coreos/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rkt/languages","stargazers_url":"https://api.github.com/repos/coreos/rkt/stargazers","contributors_url":"https://api.github.com/repos/coreos/rkt/contributors","subscribers_url":"https://api.github.com/repos/coreos/rkt/subscribers","subscription_url":"https://api.github.com/repos/coreos/rkt/subscription","commits_url":"https://api.github.com/repos/coreos/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rkt/merges","archive_url":"https://api.github.com/repos/coreos/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rkt/downloads","issues_url":"https://api.github.com/repos/coreos/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rkt/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rkt/releases{/id}","created_at":"2014-11-11T23:13:18Z","updated_at":"2015-04-15T15:40:52Z","pushed_at":"2015-04-15T16:06:19Z","git_url":"git://github.com/coreos/rkt.git","ssh_url":"git@github.com:coreos/rkt.git","clone_url":"https://github.com/coreos/rkt.git","svn_url":"https://github.com/coreos/rkt","homepage":"","size":12369,"stargazers_count":3786,"watchers_count":3786,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":282,"mirror_url":null,"open_issues_count":88,"forks":282,"open_issues":88,"watchers":3786,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/765"},"html":{"href":"https://github.com/coreos/rkt/pull/765"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/765"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/765/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/765/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/765/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/0624d98d93b9b588aac58c9bc3b290f9c90f46b5"}}}}