{"action":"created","comment":{"url":"https://api.github.com/repos/docker/machine/pulls/comments/41805944","id":41805944,"diff_hunk":"@@ -0,0 +1,153 @@\n+package google\n+\n+import (\n+\t\"errors\"\n+\t\"testing\"\n+\n+\t\"github.com/codegangsta/cli\"\n+\t\"github.com/stretchr/testify/assert\"\n+)\n+\n+func TestDriverName(t *testing.T) {\n+\tdriverName := newDriver().DriverName()\n+\n+\tassert.Equal(t, \"google\", driverName)\n+}\n+\n+func TestFailWithoutProject(t *testing.T) {\n+\t_, err := create([]string{\"test-name\"})\n+\n+\tassert.EqualError(t, err, \"Please specify the Google Cloud Project name using the option --google-project.\")\n+}\n+\n+func TestParseFlags(t *testing.T) {\n+\tdriver, err := create([]string{","path":"drivers/google/google_test.go","position":24,"original_position":24,"commit_id":"206c0593e6966df0cac52d80103cc220118337f7","original_commit_id":"206c0593e6966df0cac52d80103cc220118337f7","user":{"login":"dgageot","id":153495,"avatar_url":"https://avatars.githubusercontent.com/u/153495?v=3","gravatar_id":"","url":"https://api.github.com/users/dgageot","html_url":"https://github.com/dgageot","followers_url":"https://api.github.com/users/dgageot/followers","following_url":"https://api.github.com/users/dgageot/following{/other_user}","gists_url":"https://api.github.com/users/dgageot/gists{/gist_id}","starred_url":"https://api.github.com/users/dgageot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgageot/subscriptions","organizations_url":"https://api.github.com/users/dgageot/orgs","repos_url":"https://api.github.com/users/dgageot/repos","events_url":"https://api.github.com/users/dgageot/events{/privacy}","received_events_url":"https://api.github.com/users/dgageot/received_events","type":"User","site_admin":false},"body":"I beg to differ. The issue we are to fix comes from code that fails to parse the command line. If we unit test `SetConfigFromFlags` with a `DriverOptionsMock`, we don't spot the bug. There needs to be something that verifies that a given command line transforms into the appropriate action or error. An e2e test would cost too much, would rely on external services and couldn't cover all edge cases. By calling the `create` method with all the combinations of arguments, we can almost test 100% of the driver and this is cheap and doesn't rely on anything external.\r\n\r\n","created_at":"2015-10-12T21:59:26Z","updated_at":"2015-10-12T21:59:26Z","html_url":"https://github.com/docker/machine/pull/1973#discussion_r41805944","pull_request_url":"https://api.github.com/repos/docker/machine/pulls/1973","_links":{"self":{"href":"https://api.github.com/repos/docker/machine/pulls/comments/41805944"},"html":{"href":"https://github.com/docker/machine/pull/1973#discussion_r41805944"},"pull_request":{"href":"https://api.github.com/repos/docker/machine/pulls/1973"}}},"pull_request":{"url":"https://api.github.com/repos/docker/machine/pulls/1973","id":47399437,"html_url":"https://github.com/docker/machine/pull/1973","diff_url":"https://github.com/docker/machine/pull/1973.diff","patch_url":"https://github.com/docker/machine/pull/1973.patch","issue_url":"https://api.github.com/repos/docker/machine/issues/1973","number":1973,"state":"open","locked":false,"title":"Fix #1972 Google drive is broken because of tags","user":{"login":"dgageot","id":153495,"avatar_url":"https://avatars.githubusercontent.com/u/153495?v=3","gravatar_id":"","url":"https://api.github.com/users/dgageot","html_url":"https://github.com/dgageot","followers_url":"https://api.github.com/users/dgageot/followers","following_url":"https://api.github.com/users/dgageot/following{/other_user}","gists_url":"https://api.github.com/users/dgageot/gists{/gist_id}","starred_url":"https://api.github.com/users/dgageot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgageot/subscriptions","organizations_url":"https://api.github.com/users/dgageot/orgs","repos_url":"https://api.github.com/users/dgageot/repos","events_url":"https://api.github.com/users/dgageot/events{/privacy}","received_events_url":"https://api.github.com/users/dgageot/received_events","type":"User","site_admin":false},"body":"Signed-off-by: David Gageot <david@gageot.net>","created_at":"2015-10-12T09:26:02Z","updated_at":"2015-10-12T21:59:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"146535d6eb0fcf3b12b0e83e8256ff29b85811c9","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/machine/milestones/5","html_url":"https://github.com/docker/machine/milestones/0.5.0","labels_url":"https://api.github.com/repos/docker/machine/milestones/5/labels","id":1219188,"number":5,"title":"0.5.0","description":"","creator":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":31,"state":"open","created_at":"2015-07-21T21:58:41Z","updated_at":"2015-10-12T18:06:28Z","due_on":"2015-10-29T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/machine/pulls/1973/commits","review_comments_url":"https://api.github.com/repos/docker/machine/pulls/1973/comments","review_comment_url":"https://api.github.com/repos/docker/machine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/machine/issues/1973/comments","statuses_url":"https://api.github.com/repos/docker/machine/statuses/206c0593e6966df0cac52d80103cc220118337f7","head":{"label":"dgageot:1972-fix-google-driver-tags","ref":"1972-fix-google-driver-tags","sha":"206c0593e6966df0cac52d80103cc220118337f7","user":{"login":"dgageot","id":153495,"avatar_url":"https://avatars.githubusercontent.com/u/153495?v=3","gravatar_id":"","url":"https://api.github.com/users/dgageot","html_url":"https://github.com/dgageot","followers_url":"https://api.github.com/users/dgageot/followers","following_url":"https://api.github.com/users/dgageot/following{/other_user}","gists_url":"https://api.github.com/users/dgageot/gists{/gist_id}","starred_url":"https://api.github.com/users/dgageot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgageot/subscriptions","organizations_url":"https://api.github.com/users/dgageot/orgs","repos_url":"https://api.github.com/users/dgageot/repos","events_url":"https://api.github.com/users/dgageot/events{/privacy}","received_events_url":"https://api.github.com/users/dgageot/received_events","type":"User","site_admin":false},"repo":{"id":35428053,"name":"machine","full_name":"dgageot/machine","owner":{"login":"dgageot","id":153495,"avatar_url":"https://avatars.githubusercontent.com/u/153495?v=3","gravatar_id":"","url":"https://api.github.com/users/dgageot","html_url":"https://github.com/dgageot","followers_url":"https://api.github.com/users/dgageot/followers","following_url":"https://api.github.com/users/dgageot/following{/other_user}","gists_url":"https://api.github.com/users/dgageot/gists{/gist_id}","starred_url":"https://api.github.com/users/dgageot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgageot/subscriptions","organizations_url":"https://api.github.com/users/dgageot/orgs","repos_url":"https://api.github.com/users/dgageot/repos","events_url":"https://api.github.com/users/dgageot/events{/privacy}","received_events_url":"https://api.github.com/users/dgageot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgageot/machine","description":"Machine management for a container-centric world","fork":true,"url":"https://api.github.com/repos/dgageot/machine","forks_url":"https://api.github.com/repos/dgageot/machine/forks","keys_url":"https://api.github.com/repos/dgageot/machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgageot/machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgageot/machine/teams","hooks_url":"https://api.github.com/repos/dgageot/machine/hooks","issue_events_url":"https://api.github.com/repos/dgageot/machine/issues/events{/number}","events_url":"https://api.github.com/repos/dgageot/machine/events","assignees_url":"https://api.github.com/repos/dgageot/machine/assignees{/user}","branches_url":"https://api.github.com/repos/dgageot/machine/branches{/branch}","tags_url":"https://api.github.com/repos/dgageot/machine/tags","blobs_url":"https://api.github.com/repos/dgageot/machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgageot/machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgageot/machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgageot/machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgageot/machine/statuses/{sha}","languages_url":"https://api.github.com/repos/dgageot/machine/languages","stargazers_url":"https://api.github.com/repos/dgageot/machine/stargazers","contributors_url":"https://api.github.com/repos/dgageot/machine/contributors","subscribers_url":"https://api.github.com/repos/dgageot/machine/subscribers","subscription_url":"https://api.github.com/repos/dgageot/machine/subscription","commits_url":"https://api.github.com/repos/dgageot/machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgageot/machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgageot/machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgageot/machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgageot/machine/contents/{+path}","compare_url":"https://api.github.com/repos/dgageot/machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgageot/machine/merges","archive_url":"https://api.github.com/repos/dgageot/machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgageot/machine/downloads","issues_url":"https://api.github.com/repos/dgageot/machine/issues{/number}","pulls_url":"https://api.github.com/repos/dgageot/machine/pulls{/number}","milestones_url":"https://api.github.com/repos/dgageot/machine/milestones{/number}","notifications_url":"https://api.github.com/repos/dgageot/machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgageot/machine/labels{/name}","releases_url":"https://api.github.com/repos/dgageot/machine/releases{/id}","created_at":"2015-05-11T14:11:59Z","updated_at":"2015-05-11T14:12:00Z","pushed_at":"2015-10-12T17:27:50Z","git_url":"git://github.com/dgageot/machine.git","ssh_url":"git@github.com:dgageot/machine.git","clone_url":"https://github.com/dgageot/machine.git","svn_url":"https://github.com/dgageot/machine","homepage":"https://docs.docker.com/machine/","size":8880,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"6a5219b879db52698ccb2b7e0aafd516b34df839","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":27494663,"name":"machine","full_name":"docker/machine","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/machine","description":"Machine management for a container-centric world","fork":false,"url":"https://api.github.com/repos/docker/machine","forks_url":"https://api.github.com/repos/docker/machine/forks","keys_url":"https://api.github.com/repos/docker/machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/machine/teams","hooks_url":"https://api.github.com/repos/docker/machine/hooks","issue_events_url":"https://api.github.com/repos/docker/machine/issues/events{/number}","events_url":"https://api.github.com/repos/docker/machine/events","assignees_url":"https://api.github.com/repos/docker/machine/assignees{/user}","branches_url":"https://api.github.com/repos/docker/machine/branches{/branch}","tags_url":"https://api.github.com/repos/docker/machine/tags","blobs_url":"https://api.github.com/repos/docker/machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/machine/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/machine/languages","stargazers_url":"https://api.github.com/repos/docker/machine/stargazers","contributors_url":"https://api.github.com/repos/docker/machine/contributors","subscribers_url":"https://api.github.com/repos/docker/machine/subscribers","subscription_url":"https://api.github.com/repos/docker/machine/subscription","commits_url":"https://api.github.com/repos/docker/machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/machine/contents/{+path}","compare_url":"https://api.github.com/repos/docker/machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/machine/merges","archive_url":"https://api.github.com/repos/docker/machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/machine/downloads","issues_url":"https://api.github.com/repos/docker/machine/issues{/number}","pulls_url":"https://api.github.com/repos/docker/machine/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/machine/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/machine/labels{/name}","releases_url":"https://api.github.com/repos/docker/machine/releases{/id}","created_at":"2014-12-03T15:52:06Z","updated_at":"2015-10-12T13:04:25Z","pushed_at":"2015-10-12T18:19:25Z","git_url":"git://github.com/docker/machine.git","ssh_url":"git@github.com:docker/machine.git","clone_url":"https://github.com/docker/machine.git","svn_url":"https://github.com/docker/machine","homepage":"https://docs.docker.com/machine/","size":32194,"stargazers_count":2545,"watchers_count":2545,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":545,"mirror_url":null,"open_issues_count":426,"forks":545,"open_issues":426,"watchers":2545,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/machine/pulls/1973"},"html":{"href":"https://github.com/docker/machine/pull/1973"},"issue":{"href":"https://api.github.com/repos/docker/machine/issues/1973"},"comments":{"href":"https://api.github.com/repos/docker/machine/issues/1973/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/machine/pulls/1973/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/machine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/machine/pulls/1973/commits"},"statuses":{"href":"https://api.github.com/repos/docker/machine/statuses/206c0593e6966df0cac52d80103cc220118337f7"}}}}