{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/25123301","id":25123301,"diff_hunk":"@@ -569,17 +569,42 @@ func fakeContext(dockerfile string, files map[string]string) (*FakeContext, erro\n \treturn ctx, nil\n }\n \n-type FakeStorage struct {\n+// FakeStorage is a static file server. It might be running locally or remotely\n+// on test host.\n+type FakeStorage interface {\n+\tClose() error\n+\tURL() string\n+\tCtxDir() string\n+}\n+\n+// fakeStorage returns either a local or remote (at daemon machine) file server\n+func fakeStorage(files map[string]string) (FakeStorage, error) {\n+\tif isLocalDaemon {","path":"integration-cli/docker_utils.go","position":15,"original_position":15,"commit_id":"37336298080c68794c496dc36aa3a34cdf5c41ec","original_commit_id":"37336298080c68794c496dc36aa3a34cdf5c41ec","user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"body":"Why aren't we just going to use the container-based http server in both cases to avoid having to maintain two separate implementations that at the end of the day perform exactly the same function in the same way?","created_at":"2015-02-21T16:29:38Z","updated_at":"2015-02-21T16:29:38Z","html_url":"https://github.com/docker/docker/pull/10893#discussion_r25123301","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/10893","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/25123301"},"html":{"href":"https://github.com/docker/docker/pull/10893#discussion_r25123301"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/10893"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/10893","id":29599760,"html_url":"https://github.com/docker/docker/pull/10893","diff_url":"https://github.com/docker/docker/pull/10893.diff","patch_url":"https://github.com/docker/docker/pull/10893.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/10893","number":10893,"state":"open","locked":false,"title":"integ-cli: Implement remote FakeStorage server for build via URL tests","user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"body":"Implemented a FakeStorage alternative that supports spinning\r\nup a remote container on DOCKER_TEST_HOST to serve files over\r\na nginx server so that tests which use URLs in Dockerfile can\r\nbuild them over at the daemon side.\r\n\r\n`fakeStorage` function now automatically chooses if it should\r\nuse a local httptest.Server or a remote container.\r\n\r\nThis fixes the following tests when running against a remote\r\ndaemon (Windows CI):\r\n\r\n- `TestBuildCacheADD`\r\n- `TestBuildCopyWildcardNoFind`\r\n- `TestBuildCopyWildcardCache`\r\n- `TestBuildADDRemoteFileWithCache`\r\n- `TestBuildADDRemoteFileWithoutCache`\r\n- `TestBuildADDRemoteFileMTime`\r\n- `TestBuildADDLocalAndRemoteFilesWithCache`\r\n- `TestBuildADDLocalAndRemoteFilesWithoutCache`\r\n\r\nSigned-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>\r\ncc: @tianon @unclejack @jfrazelle @icecrime @tiborvass\r\n\r\n> P.S. There's an issue with `TestBuildCopyWildcard` on Windows even though the required PR #10865 gets merged. I will work on a fix for it soon.","created_at":"2015-02-19T10:21:36Z","updated_at":"2015-02-21T16:29:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19db5615df15a04a1dc80b0f03f8c48df467b6e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/10893/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/10893/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/10893/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/37336298080c68794c496dc36aa3a34cdf5c41ec","head":{"label":"ahmetalpbalkan:win-cli/BuildViaDockerfileURL-same-host-fix","ref":"win-cli/BuildViaDockerfileURL-same-host-fix","sha":"37336298080c68794c496dc36aa3a34cdf5c41ec","user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"repo":{"id":30384043,"name":"docker","full_name":"ahmetalpbalkan/docker","owner":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahmetalpbalkan/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/ahmetalpbalkan/docker","forks_url":"https://api.github.com/repos/ahmetalpbalkan/docker/forks","keys_url":"https://api.github.com/repos/ahmetalpbalkan/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahmetalpbalkan/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahmetalpbalkan/docker/teams","hooks_url":"https://api.github.com/repos/ahmetalpbalkan/docker/hooks","issue_events_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues/events{/number}","events_url":"https://api.github.com/repos/ahmetalpbalkan/docker/events","assignees_url":"https://api.github.com/repos/ahmetalpbalkan/docker/assignees{/user}","branches_url":"https://api.github.com/repos/ahmetalpbalkan/docker/branches{/branch}","tags_url":"https://api.github.com/repos/ahmetalpbalkan/docker/tags","blobs_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahmetalpbalkan/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/ahmetalpbalkan/docker/languages","stargazers_url":"https://api.github.com/repos/ahmetalpbalkan/docker/stargazers","contributors_url":"https://api.github.com/repos/ahmetalpbalkan/docker/contributors","subscribers_url":"https://api.github.com/repos/ahmetalpbalkan/docker/subscribers","subscription_url":"https://api.github.com/repos/ahmetalpbalkan/docker/subscription","commits_url":"https://api.github.com/repos/ahmetalpbalkan/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahmetalpbalkan/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahmetalpbalkan/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/ahmetalpbalkan/docker/contents/{+path}","compare_url":"https://api.github.com/repos/ahmetalpbalkan/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahmetalpbalkan/docker/merges","archive_url":"https://api.github.com/repos/ahmetalpbalkan/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahmetalpbalkan/docker/downloads","issues_url":"https://api.github.com/repos/ahmetalpbalkan/docker/issues{/number}","pulls_url":"https://api.github.com/repos/ahmetalpbalkan/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/ahmetalpbalkan/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/ahmetalpbalkan/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahmetalpbalkan/docker/labels{/name}","releases_url":"https://api.github.com/repos/ahmetalpbalkan/docker/releases{/id}","created_at":"2015-02-05T23:23:10Z","updated_at":"2015-02-20T21:27:21Z","pushed_at":"2015-02-21T07:26:06Z","git_url":"git://github.com/ahmetalpbalkan/docker.git","ssh_url":"git@github.com:ahmetalpbalkan/docker.git","clone_url":"https://github.com/ahmetalpbalkan/docker.git","svn_url":"https://github.com/ahmetalpbalkan/docker","homepage":"http://www.docker.com","size":41716,"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":"docker:master","ref":"master","sha":"a78ce5c228b895d8c614d72354a52e324817b9fc","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","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=3","gravatar_id":"","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":"2015-02-21T15:37:04Z","pushed_at":"2015-02-21T07:48:56Z","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":139920,"stargazers_count":19301,"watchers_count":19301,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4000,"mirror_url":null,"open_issues_count":1045,"forks":4000,"open_issues":1045,"watchers":19301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/10893"},"html":{"href":"https://github.com/docker/docker/pull/10893"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/10893"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/10893/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/10893/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/10893/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/37336298080c68794c496dc36aa3a34cdf5c41ec"}}}}