GitHub PullRequestReviewCommentEvent at 2014-07-30 15:45:04
Repository: docker
Actor: ostezer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/15592187","id":15592187,"diff_hunk":"@@ -0,0 +1,111 @@\n+package main\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"os/exec\"\n+\t\"testing\"\n+\t\"time\"\n+)\n+\n+// Make sure we can create a simple container with some args\n+func TestDockerCreateArgs(t *testing.T) {\n+\trunCmd := exec.Command(dockerBinary, \"create\", \"busybox\", \"command\", \"arg1\", \"arg2\", \"arg with space\")\n+\tout, _, _, err := runCommandWithStdoutStderr(runCmd)\n+\terrorOut(err, t, out)\n+\n+\tcleanedContainerID := stripTrailingCharacters(out)\n+\n+\tinspectCmd := exec.Command(dockerBinary, \"inspect\", cleanedContainerID)\n+\tinspectOut, _, err := runCommandWithOutput(inspectCmd)\n+\terrorOut(err, t, fmt.Sprintf(\"out should've been a container id: %v %v\", inspectOut, err))\n+\n+\tcontainers := []struct {\n+\t\tID      string\n+\t\tCreated time.Time\n+\t\tPath    string\n+\t\tArgs    []string\n+\t\tImage   string\n+\t}{}\n+\tif err := json.Unmarshal([]byte(inspectOut), &containers); err != nil {\n+\t\tt.Fatalf(\"Error inspecting the container: %s\", err)\n+\t}\n+\tif len(containers) != 1 {\n+\t\tt.Fatalf(\"Unexpected container count. Expected 0, recieved: %d\", len(containers))\n+\t}\n+\n+\tc := containers[0]\n+\tif c.Path != \"command\" {\n+\t\tt.Fatalf(\"Unexpected container path. Expected command, recieved: %s\", c.Path)\n+\t}\n+\n+\tif len(c.Args) != 3 ||\n+\t\tc.Args[0] != \"arg1\" ||\n+\t\tc.Args[1] != \"arg2\" ||\n+\t\tc.Args[2] != \"arg with space\" {\n+\t\tt.Fatalf(\"Unexpected args. Expected recieved: %v\", c.Args)\n+\t}\n+\n+\tdeleteAllContainers()\n+\n+\tlogDone(\"create - args\")\n+}\n+\n+// Make sure we can set hostconfig options too\n+func TestDockerCreateHostConfig(t *testing.T) {\n+\trunCmd := exec.Command(dockerBinary, \"create\", \"-P\", \"busybox\", \"echo\")\n+\tout, _, _, err := runCommandWithStdoutStderr(runCmd)\n+\terrorOut(err, t, out)\n+\n+\tcleanedContainerID := stripTrailingCharacters(out)\n+\n+\tinspectCmd := exec.Command(dockerBinary, \"inspect\", cleanedContainerID)\n+\tinspectOut, _, err := runCommandWithOutput(inspectCmd)\n+\terrorOut(err, t, fmt.Sprintf(\"out should've been a container id: %v %v\", inspectOut, err))","path":"integration-cli/docker_cli_create_test.go","position":64,"original_position":64,"commit_id":"95f8afa30e4f4e1467c068240e031a95f8fdd7e9","original_commit_id":"95f8afa30e4f4e1467c068240e031a95f8fdd7e9","user":{"login":"ostezer","id":6561122,"avatar_url":"https://avatars.githubusercontent.com/u/6561122?v=1","gravatar_id":"26dc2b32b9e753823aef55e89687a9fc","url":"https://api.github.com/users/ostezer","html_url":"https://github.com/ostezer","followers_url":"https://api.github.com/users/ostezer/followers","following_url":"https://api.github.com/users/ostezer/following{/other_user}","gists_url":"https://api.github.com/users/ostezer/gists{/gist_id}","starred_url":"https://api.github.com/users/ostezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostezer/subscriptions","organizations_url":"https://api.github.com/users/ostezer/orgs","repos_url":"https://api.github.com/users/ostezer/repos","events_url":"https://api.github.com/users/ostezer/events{/privacy}","received_events_url":"https://api.github.com/users/ostezer/received_events","type":"User","site_admin":false},"body":"\".. been a container id:\" > \".. been a container ID:\"","created_at":"2014-07-30T15:45:04Z","updated_at":"2014-07-30T15:45:04Z","html_url":"https://github.com/docker/docker/pull/7110#discussion_r15592187","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/7110","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/15592187"},"html":{"href":"https://github.com/docker/docker/pull/7110#discussion_r15592187"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/7110"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/7110","id":18613143,"html_url":"https://github.com/docker/docker/pull/7110","diff_url":"https://github.com/docker/docker/pull/7110.diff","patch_url":"https://github.com/docker/docker/pull/7110.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/7110","number":7110,"state":"open","title":"Docker create (rebase of 6907)","user":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=1","gravatar_id":"9b95474f8df70f47101784364ec4e985","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"body":"Closes #6907\r\n\r\nPing @vieux @unclejack @crosbymichael","created_at":"2014-07-18T22:56:11Z","updated_at":"2014-07-30T15:45:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99c748b0e61c7d32ffbf2b91dd020aa29b492690","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/7110/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/7110/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/7110/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/95f8afa30e4f4e1467c068240e031a95f8fdd7e9","head":{"label":"tiborvass:merge-6907","ref":"merge-6907","sha":"95f8afa30e4f4e1467c068240e031a95f8fdd7e9","user":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=1","gravatar_id":"9b95474f8df70f47101784364ec4e985","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"repo":{"id":16678776,"name":"docker","full_name":"tiborvass/docker","owner":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=1","gravatar_id":"9b95474f8df70f47101784364ec4e985","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiborvass/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/tiborvass/docker","forks_url":"https://api.github.com/repos/tiborvass/docker/forks","keys_url":"https://api.github.com/repos/tiborvass/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiborvass/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiborvass/docker/teams","hooks_url":"https://api.github.com/repos/tiborvass/docker/hooks","issue_events_url":"https://api.github.com/repos/tiborvass/docker/issues/events{/number}","events_url":"https://api.github.com/repos/tiborvass/docker/events","assignees_url":"https://api.github.com/repos/tiborvass/docker/assignees{/user}","branches_url":"https://api.github.com/repos/tiborvass/docker/branches{/branch}","tags_url":"https://api.github.com/repos/tiborvass/docker/tags","blobs_url":"https://api.github.com/repos/tiborvass/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiborvass/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiborvass/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiborvass/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiborvass/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/tiborvass/docker/languages","stargazers_url":"https://api.github.com/repos/tiborvass/docker/stargazers","contributors_url":"https://api.github.com/repos/tiborvass/docker/contributors","subscribers_url":"https://api.github.com/repos/tiborvass/docker/subscribers","subscription_url":"https://api.github.com/repos/tiborvass/docker/subscription","commits_url":"https://api.github.com/repos/tiborvass/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiborvass/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiborvass/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiborvass/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/tiborvass/docker/contents/{+path}","compare_url":"https://api.github.com/repos/tiborvass/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiborvass/docker/merges","archive_url":"https://api.github.com/repos/tiborvass/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiborvass/docker/downloads","issues_url":"https://api.github.com/repos/tiborvass/docker/issues{/number}","pulls_url":"https://api.github.com/repos/tiborvass/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/tiborvass/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/tiborvass/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiborvass/docker/labels{/name}","releases_url":"https://api.github.com/repos/tiborvass/docker/releases{/id}","created_at":"2014-02-09T23:31:28Z","updated_at":"2014-07-24T21:22:38Z","pushed_at":"2014-07-30T15:07:09Z","git_url":"git://github.com/tiborvass/docker.git","ssh_url":"git@github.com:tiborvass/docker.git","clone_url":"https://github.com/tiborvass/docker.git","svn_url":"https://github.com/tiborvass/docker","homepage":"http://www.docker.io","size":31225,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"c18b38f912d08105177630718a78562186ae7324","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=1","gravatar_id":null,"url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=1","gravatar_id":null,"url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2014-07-30T15:37:17Z","pushed_at":"2014-07-30T15:43:01Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":127308,"stargazers_count":13950,"watchers_count":13950,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2566,"mirror_url":null,"open_issues_count":738,"forks":2566,"open_issues":738,"watchers":13950,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/7110"},"html":{"href":"https://github.com/docker/docker/pull/7110"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/7110"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/7110/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/7110/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/7110/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/95f8afa30e4f4e1467c068240e031a95f8fdd7e9"}}}}