{"action":"created","comment":{"url":"https://api.github.com/repos/uber/ringpop-common/pulls/comments/67511885","id":67511885,"diff_hunk":"@@ -0,0 +1,97 @@\n+// Copyright (c) 2016 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+// The file contains a utility for calculation expressions. This is useful when\n+// parsing the tests because when for example we want to assert that the\n+// number of suspect declarations in a split brane is equal to\n+// \"N/2 * N/2 * 2\" where N is the cluster size.\n+\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"go/ast\"\n+\t\"go/parser\"\n+\t\"strconv\"\n+\n+\t\"github.com/pkg/errors\"\n+)\n+\n+// Eval evaluates the value of an expression to a float64. It can be used\n+// as a simple calculator. e.g: `\"2+3*4\" -> 14.0`.\n+func Eval(expression string) (f float64, err error) {","path":"cluster-test/test-orchestrator/calc.go","position":39,"original_position":39,"commit_id":"e7b5636ba9fc6333af204cf9980ff8073cea1168","original_commit_id":"6bb89498764b116dc1bb5ea9359c7542d94c6b80","user":{"login":"CorgiMan","id":2640140,"avatar_url":"https://avatars.githubusercontent.com/u/2640140?v=3","gravatar_id":"","url":"https://api.github.com/users/CorgiMan","html_url":"https://github.com/CorgiMan","followers_url":"https://api.github.com/users/CorgiMan/followers","following_url":"https://api.github.com/users/CorgiMan/following{/other_user}","gists_url":"https://api.github.com/users/CorgiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CorgiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorgiMan/subscriptions","organizations_url":"https://api.github.com/users/CorgiMan/orgs","repos_url":"https://api.github.com/users/CorgiMan/repos","events_url":"https://api.github.com/users/CorgiMan/events{/privacy}","received_events_url":"https://api.github.com/users/CorgiMan/received_events","type":"User","site_admin":false},"body":"Tests are added","created_at":"2016-06-17T13:43:48Z","updated_at":"2016-06-17T13:43:48Z","html_url":"https://github.com/uber/ringpop-common/pull/76#discussion_r67511885","pull_request_url":"https://api.github.com/repos/uber/ringpop-common/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/comments/67511885"},"html":{"href":"https://github.com/uber/ringpop-common/pull/76#discussion_r67511885"},"pull_request":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/uber/ringpop-common/pulls/76","id":74114821,"html_url":"https://github.com/uber/ringpop-common/pull/76","diff_url":"https://github.com/uber/ringpop-common/pull/76.diff","patch_url":"https://github.com/uber/ringpop-common/pull/76.patch","issue_url":"https://api.github.com/repos/uber/ringpop-common/issues/76","number":76,"state":"open","locked":false,"title":"placeholders for command, scenario structs and a calculator utility.","user":{"login":"CorgiMan","id":2640140,"avatar_url":"https://avatars.githubusercontent.com/u/2640140?v=3","gravatar_id":"","url":"https://api.github.com/users/CorgiMan","html_url":"https://github.com/CorgiMan","followers_url":"https://api.github.com/users/CorgiMan/followers","following_url":"https://api.github.com/users/CorgiMan/following{/other_user}","gists_url":"https://api.github.com/users/CorgiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CorgiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorgiMan/subscriptions","organizations_url":"https://api.github.com/users/CorgiMan/orgs","repos_url":"https://api.github.com/users/CorgiMan/repos","events_url":"https://api.github.com/users/CorgiMan/events{/privacy}","received_events_url":"https://api.github.com/users/CorgiMan/received_events","type":"User","site_admin":false},"body":"Part 4 of the cluster-test-orchestrator\r\n\r\nThis PR contains placeholder structs for Command and Scenario which can be filled in by the parser which will be added to Part 5 of the cluster-test-orchestrater in #77.\r\n\r\nThis PR also contains a calculator utility that is also used while parsing the test yaml-files.\r\n","created_at":"2016-06-16T16:50:26Z","updated_at":"2016-06-17T13:43:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76183782e0138f48ca0476cb38cd2e1e31ec3263","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/ringpop-common/pulls/76/commits","review_comments_url":"https://api.github.com/repos/uber/ringpop-common/pulls/76/comments","review_comment_url":"https://api.github.com/repos/uber/ringpop-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/ringpop-common/issues/76/comments","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/e7b5636ba9fc6333af204cf9980ff8073cea1168","head":{"label":"uber:ws-structs-for-parsing","ref":"ws-structs-for-parsing","sha":"e7b5636ba9fc6333af204cf9980ff8073cea1168","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41671989,"name":"ringpop-common","full_name":"uber/ringpop-common","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-common","description":"Cross-language compatible tools and documentation for Ringpop","fork":false,"url":"https://api.github.com/repos/uber/ringpop-common","forks_url":"https://api.github.com/repos/uber/ringpop-common/forks","keys_url":"https://api.github.com/repos/uber/ringpop-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-common/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-common/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-common/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-common/events","assignees_url":"https://api.github.com/repos/uber/ringpop-common/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-common/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-common/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-common/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-common/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-common/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-common/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-common/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-common/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-common/merges","archive_url":"https://api.github.com/repos/uber/ringpop-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-common/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-common/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-common/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-common/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-common/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-common/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-common/deployments","created_at":"2015-08-31T11:32:45Z","updated_at":"2016-06-10T14:17:41Z","pushed_at":"2016-06-17T13:43:33Z","git_url":"git://github.com/uber/ringpop-common.git","ssh_url":"git@github.com:uber/ringpop-common.git","clone_url":"https://github.com/uber/ringpop-common.git","svn_url":"https://github.com/uber/ringpop-common","homepage":"http://uber.github.io/ringpop/","size":326,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":6,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"a933e2e3c8189e1441ebfd37905f3a9021e50c08","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":41671989,"name":"ringpop-common","full_name":"uber/ringpop-common","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/ringpop-common","description":"Cross-language compatible tools and documentation for Ringpop","fork":false,"url":"https://api.github.com/repos/uber/ringpop-common","forks_url":"https://api.github.com/repos/uber/ringpop-common/forks","keys_url":"https://api.github.com/repos/uber/ringpop-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/ringpop-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/ringpop-common/teams","hooks_url":"https://api.github.com/repos/uber/ringpop-common/hooks","issue_events_url":"https://api.github.com/repos/uber/ringpop-common/issues/events{/number}","events_url":"https://api.github.com/repos/uber/ringpop-common/events","assignees_url":"https://api.github.com/repos/uber/ringpop-common/assignees{/user}","branches_url":"https://api.github.com/repos/uber/ringpop-common/branches{/branch}","tags_url":"https://api.github.com/repos/uber/ringpop-common/tags","blobs_url":"https://api.github.com/repos/uber/ringpop-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/ringpop-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/ringpop-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/ringpop-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/ringpop-common/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/ringpop-common/languages","stargazers_url":"https://api.github.com/repos/uber/ringpop-common/stargazers","contributors_url":"https://api.github.com/repos/uber/ringpop-common/contributors","subscribers_url":"https://api.github.com/repos/uber/ringpop-common/subscribers","subscription_url":"https://api.github.com/repos/uber/ringpop-common/subscription","commits_url":"https://api.github.com/repos/uber/ringpop-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/ringpop-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/ringpop-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/ringpop-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/ringpop-common/contents/{+path}","compare_url":"https://api.github.com/repos/uber/ringpop-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/ringpop-common/merges","archive_url":"https://api.github.com/repos/uber/ringpop-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/ringpop-common/downloads","issues_url":"https://api.github.com/repos/uber/ringpop-common/issues{/number}","pulls_url":"https://api.github.com/repos/uber/ringpop-common/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/ringpop-common/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/ringpop-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/ringpop-common/labels{/name}","releases_url":"https://api.github.com/repos/uber/ringpop-common/releases{/id}","deployments_url":"https://api.github.com/repos/uber/ringpop-common/deployments","created_at":"2015-08-31T11:32:45Z","updated_at":"2016-06-10T14:17:41Z","pushed_at":"2016-06-17T13:43:33Z","git_url":"git://github.com/uber/ringpop-common.git","ssh_url":"git@github.com:uber/ringpop-common.git","clone_url":"https://github.com/uber/ringpop-common.git","svn_url":"https://github.com/uber/ringpop-common","homepage":"http://uber.github.io/ringpop/","size":326,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/76"},"html":{"href":"https://github.com/uber/ringpop-common/pull/76"},"issue":{"href":"https://api.github.com/repos/uber/ringpop-common/issues/76"},"comments":{"href":"https://api.github.com/repos/uber/ringpop-common/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/ringpop-common/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/uber/ringpop-common/statuses/e7b5636ba9fc6333af204cf9980ff8073cea1168"}}}}
{"actor":{"display_login":"CorgiMan"}}