GitHub PullRequestReviewCommentEvent at 2014-11-25 10:32:51
Repository: charmstore
Actor: mhilton
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/juju/charmstore/pulls/comments/20854332","id":20854332,"diff_hunk":"@@ -495,3 +350,32 @@ func (s *Suite) TestEscapeRegexp(c *gc.C) {\n \t\tc.Assert(es.EscapeRegexp(test.original), gc.Equals, test.expected)\n \t}\n }\n+\n+func (s *Suite) TestAlias(c *gc.C) {\n+\tuuid, err := utils.NewUUID()\n+\tc.Assert(err, gc.Equals, nil)\n+\talias := uuid.String()\n+\tindex1 := alias + \"-1\"\n+\tindex2 := alias + \"-2\"\n+\terr = s.ES.PutIndex(index1, struct{}{})\n+\tc.Assert(err, gc.Equals, nil)\n+\tdefer s.ES.DeleteIndex(index1)\n+\terr = s.ES.PutIndex(index2, struct{}{})\n+\tc.Assert(err, gc.Equals, nil)\n+\tdefer s.ES.DeleteIndex(index2)\n+\tindexes, err := s.ES.ListIndexesForAlias(alias)\n+\tc.Assert(err, gc.Equals, nil)\n+\tc.Assert(indexes, gc.HasLen, 0)\n+\terr = s.ES.Alias(index1, alias)\n+\tc.Assert(err, gc.Equals, nil)\n+\tindexes, err = s.ES.ListIndexesForAlias(alias)\n+\tc.Assert(err, gc.Equals, nil)\n+\tc.Assert(indexes, gc.HasLen, 1)\n+\tc.Assert(indexes[0], gc.Equals, index1)\n+\terr = s.ES.Alias(index2, alias)\n+\tc.Assert(err, gc.Equals, nil)\n+\tindexes, err = s.ES.ListIndexesForAlias(alias)\n+\tc.Assert(err, gc.Equals, nil)\n+\tc.Assert(indexes, gc.HasLen, 1)\n+\tc.Assert(indexes[0], gc.Equals, index2)","path":"internal/elasticsearch/elasticsearch_test.go","position":400,"original_position":308,"commit_id":"89695208922aeedea36a6f69422ca1529336bb07","original_commit_id":"d811f0004601860b9359730483b6c93d598112af","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"body":"done","created_at":"2014-11-25T10:32:51Z","updated_at":"2014-11-25T10:32:51Z","html_url":"https://github.com/juju/charmstore/pull/231#discussion_r20854332","pull_request_url":"https://api.github.com/repos/juju/charmstore/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/20854332"},"html":{"href":"https://github.com/juju/charmstore/pull/231#discussion_r20854332"},"pull_request":{"href":"https://api.github.com/repos/juju/charmstore/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/juju/charmstore/pulls/231","id":24844198,"html_url":"https://github.com/juju/charmstore/pull/231","diff_url":"https://github.com/juju/charmstore/pull/231.diff","patch_url":"https://github.com/juju/charmstore/pull/231.patch","issue_url":"https://api.github.com/repos/juju/charmstore/issues/231","number":231,"state":"open","locked":false,"title":"Automatically initialise elasticsearch.","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"body":"Charmstore will now automatically initialise elasticsearch when starting up.\r\nThis ensures that elasticsearch will always have the correct index and mapping\r\nconfiguration required for correct operation.","created_at":"2014-11-21T14:49:31Z","updated_at":"2014-11-25T10:32:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ade20dfe5d0e3c52990a1f7b01a7bafb1eb5e45f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/charmstore/pulls/231/commits","review_comments_url":"https://api.github.com/repos/juju/charmstore/pulls/231/comments","review_comment_url":"https://api.github.com/repos/juju/charmstore/pulls/comments/{number}","comments_url":"https://api.github.com/repos/juju/charmstore/issues/231/comments","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/89695208922aeedea36a6f69422ca1529336bb07","head":{"label":"mhilton:automatic-elasticsearch-sync","ref":"automatic-elasticsearch-sync","sha":"89695208922aeedea36a6f69422ca1529336bb07","user":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"repo":{"id":24229515,"name":"charmstore","full_name":"mhilton/charmstore","owner":{"login":"mhilton","id":1136018,"avatar_url":"https://avatars.githubusercontent.com/u/1136018?v=3","gravatar_id":"","url":"https://api.github.com/users/mhilton","html_url":"https://github.com/mhilton","followers_url":"https://api.github.com/users/mhilton/followers","following_url":"https://api.github.com/users/mhilton/following{/other_user}","gists_url":"https://api.github.com/users/mhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhilton/subscriptions","organizations_url":"https://api.github.com/users/mhilton/orgs","repos_url":"https://api.github.com/users/mhilton/repos","events_url":"https://api.github.com/users/mhilton/events{/privacy}","received_events_url":"https://api.github.com/users/mhilton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhilton/charmstore","description":"The charm store server.","fork":true,"url":"https://api.github.com/repos/mhilton/charmstore","forks_url":"https://api.github.com/repos/mhilton/charmstore/forks","keys_url":"https://api.github.com/repos/mhilton/charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhilton/charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhilton/charmstore/teams","hooks_url":"https://api.github.com/repos/mhilton/charmstore/hooks","issue_events_url":"https://api.github.com/repos/mhilton/charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/mhilton/charmstore/events","assignees_url":"https://api.github.com/repos/mhilton/charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/mhilton/charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/mhilton/charmstore/tags","blobs_url":"https://api.github.com/repos/mhilton/charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhilton/charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhilton/charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhilton/charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhilton/charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/mhilton/charmstore/languages","stargazers_url":"https://api.github.com/repos/mhilton/charmstore/stargazers","contributors_url":"https://api.github.com/repos/mhilton/charmstore/contributors","subscribers_url":"https://api.github.com/repos/mhilton/charmstore/subscribers","subscription_url":"https://api.github.com/repos/mhilton/charmstore/subscription","commits_url":"https://api.github.com/repos/mhilton/charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhilton/charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhilton/charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhilton/charmstore/issues/comments/{number}","contents_url":"https://api.github.com/repos/mhilton/charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/mhilton/charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhilton/charmstore/merges","archive_url":"https://api.github.com/repos/mhilton/charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhilton/charmstore/downloads","issues_url":"https://api.github.com/repos/mhilton/charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/mhilton/charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/mhilton/charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/mhilton/charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhilton/charmstore/labels{/name}","releases_url":"https://api.github.com/repos/mhilton/charmstore/releases{/id}","created_at":"2014-09-19T12:48:28Z","updated_at":"2014-09-30T13:48:31Z","pushed_at":"2014-11-25T10:32:22Z","git_url":"git://github.com/mhilton/charmstore.git","ssh_url":"git@github.com:mhilton/charmstore.git","clone_url":"https://github.com/mhilton/charmstore.git","svn_url":"https://github.com/mhilton/charmstore","homepage":null,"size":1533,"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":"v4"}},"base":{"label":"juju:v4","ref":"v4","sha":"3b3d2952c25f8b2c51dc06cbde65c0f563805800","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20720417,"name":"charmstore","full_name":"juju/charmstore","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/charmstore","description":"The charm store server.","fork":false,"url":"https://api.github.com/repos/juju/charmstore","forks_url":"https://api.github.com/repos/juju/charmstore/forks","keys_url":"https://api.github.com/repos/juju/charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/charmstore/teams","hooks_url":"https://api.github.com/repos/juju/charmstore/hooks","issue_events_url":"https://api.github.com/repos/juju/charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/juju/charmstore/events","assignees_url":"https://api.github.com/repos/juju/charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/juju/charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/juju/charmstore/tags","blobs_url":"https://api.github.com/repos/juju/charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/charmstore/languages","stargazers_url":"https://api.github.com/repos/juju/charmstore/stargazers","contributors_url":"https://api.github.com/repos/juju/charmstore/contributors","subscribers_url":"https://api.github.com/repos/juju/charmstore/subscribers","subscription_url":"https://api.github.com/repos/juju/charmstore/subscription","commits_url":"https://api.github.com/repos/juju/charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/charmstore/issues/comments/{number}","contents_url":"https://api.github.com/repos/juju/charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/juju/charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/charmstore/merges","archive_url":"https://api.github.com/repos/juju/charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/charmstore/downloads","issues_url":"https://api.github.com/repos/juju/charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/juju/charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/charmstore/labels{/name}","releases_url":"https://api.github.com/repos/juju/charmstore/releases{/id}","created_at":"2014-06-11T09:53:37Z","updated_at":"2014-11-20T19:30:17Z","pushed_at":"2014-11-24T20:50:00Z","git_url":"git://github.com/juju/charmstore.git","ssh_url":"git@github.com:juju/charmstore.git","clone_url":"https://github.com/juju/charmstore.git","svn_url":"https://github.com/juju/charmstore","homepage":null,"size":4214,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":11,"forks":12,"open_issues":11,"watchers":3,"default_branch":"v4"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/231"},"html":{"href":"https://github.com/juju/charmstore/pull/231"},"issue":{"href":"https://api.github.com/repos/juju/charmstore/issues/231"},"comments":{"href":"https://api.github.com/repos/juju/charmstore/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/charmstore/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/juju/charmstore/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/juju/charmstore/statuses/89695208922aeedea36a6f69422ca1529336bb07"}}}}