{"action":"created","comment":{"url":"https://api.github.com/repos/tmobile/jazz/pulls/comments/220745606","pull_request_review_id":159225951,"id":220745606,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDc0NTYwNg==","diff_hunk":"@@ -685,6 +685,86 @@ describe('platform_services', function() {\n     assert.isTrue(logCheck);\n   });\n \n+  /* \n+  * Given a successful attempt at a dynamo service update, handler() should indicate metadata updated successfully\n+  * @param {object} event -> event.method is defined to be \"PUT\", event.path.id is defined\n+  * @params {object, function} default aws context, and callback function as defined in beforeEach\n+  */\n+ it(\"should indicate that metadata was updated upon successful documentClient.update()\", () => {\n+  event.method = \"PUT\";\n+  logMessage = \"Metadata updated\";\n+  event.body = {\n+    metadata: {\n+      a: \"updated data\"\n+    }\n+  }\n+  //mocking DocumentClient from DynamoDB, get and  update are mocked with successful return\n+  AWS.mock(\"DynamoDB.DocumentClient\", \"get\", (params, cb) => {\n+    //injecting metadata\n+    dataObj.Item.metadata = {\n+      a: \"dummy data\"\n+    }\n+    return cb(null, dataObj);\n+  })\n+\n+  AWS.mock(\"DynamoDB.DocumentClient\", \"update\", (params, cb) => {\n+    dataObj.updateServiceByID = \"heckAp00\";\n+    return cb(null, dataObj);\n+  })\n+  //wrapping the logger to check for response messages\n+  logStub = sinon.stub(logger, \"info\", spy);\n+  //trigger the mocked logic by calling handler()\n+  var callFunction = index.handler(event, context, callbackObj.callback);\n+  var logResponse = logStub.args[9][0];\n+  var logCheck = logResponse.includes(logMessage);\n+  AWS.restore(\"DynamoDB.DocumentClient\");\n+  sinon.assert.called(stub);\n+  sinon.assert.called(logStub);\n+  logStub.restore();\n+  assert.isTrue(logCheck);\n+});\n+\n+/* \n+* Given a successful attempt at a dynamo service update, handler() should indicate array updated successfully\n+* @param {object} event -> event.method is defined to be \"PUT\", event.path.id is defined\n+* @params {object, function} default aws context, and callback function as defined in beforeEach\n+*/\n+it(\"should indicate that array was updated upon successful documentClient.update()\", () => {\n+event.method = \"PUT\";","path":"core/jazz_services/test/test.js","position":49,"original_position":49,"commit_id":"38259b39a6017c3ac8870403c2a2b8415f0bedc1","original_commit_id":"38259b39a6017c3ac8870403c2a2b8415f0bedc1","user":{"login":"svidhani","id":252128,"node_id":"MDQ6VXNlcjI1MjEyOA==","avatar_url":"https://avatars2.githubusercontent.com/u/252128?v=4","gravatar_id":"","url":"https://api.github.com/users/svidhani","html_url":"https://github.com/svidhani","followers_url":"https://api.github.com/users/svidhani/followers","following_url":"https://api.github.com/users/svidhani/following{/other_user}","gists_url":"https://api.github.com/users/svidhani/gists{/gist_id}","starred_url":"https://api.github.com/users/svidhani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svidhani/subscriptions","organizations_url":"https://api.github.com/users/svidhani/orgs","repos_url":"https://api.github.com/users/svidhani/repos","events_url":"https://api.github.com/users/svidhani/events{/privacy}","received_events_url":"https://api.github.com/users/svidhani/received_events","type":"User","site_admin":false},"body":"indentation here and other places","created_at":"2018-09-26T22:41:38Z","updated_at":"2018-09-26T22:42:08Z","html_url":"https://github.com/tmobile/jazz/pull/556#discussion_r220745606","pull_request_url":"https://api.github.com/repos/tmobile/jazz/pulls/556","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/comments/220745606"},"html":{"href":"https://github.com/tmobile/jazz/pull/556#discussion_r220745606"},"pull_request":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/556"}}},"pull_request":{"url":"https://api.github.com/repos/tmobile/jazz/pulls/556","id":216599625,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NTk5NjI1","html_url":"https://github.com/tmobile/jazz/pull/556","diff_url":"https://github.com/tmobile/jazz/pull/556.diff","patch_url":"https://github.com/tmobile/jazz/pull/556.patch","issue_url":"https://api.github.com/repos/tmobile/jazz/issues/556","number":556,"state":"open","locked":false,"title":"Update service metadata in catalog instead of overriding the object during PUT operation","user":{"login":"glearner","id":29622895,"node_id":"MDQ6VXNlcjI5NjIyODk1","avatar_url":"https://avatars1.githubusercontent.com/u/29622895?v=4","gravatar_id":"","url":"https://api.github.com/users/glearner","html_url":"https://github.com/glearner","followers_url":"https://api.github.com/users/glearner/followers","following_url":"https://api.github.com/users/glearner/following{/other_user}","gists_url":"https://api.github.com/users/glearner/gists{/gist_id}","starred_url":"https://api.github.com/users/glearner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glearner/subscriptions","organizations_url":"https://api.github.com/users/glearner/orgs","repos_url":"https://api.github.com/users/glearner/repos","events_url":"https://api.github.com/users/glearner/events{/privacy}","received_events_url":"https://api.github.com/users/glearner/received_events","type":"User","site_admin":false},"body":"### Requirements\r\n\r\n*Service api metadata update bug fixed\r\n* All new code requires tests to ensure against regressions\r\n\r\n### Description of the Change\r\n\r\nIn Service api, metadata got replaced by new meta data. I changed the code so that update will consider old data and update it along with old data.\r\n\r\n### Benefits\r\n\r\nNow consistency of metadata json is maintained.\r\n\r\n### Possible Drawbacks\r\n\r\nnot any in my view\r\n\r\n### Applicable Issues\r\n\r\nnot any in my view\r\n","created_at":"2018-09-19T11:07:19Z","updated_at":"2018-09-26T22:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e275fc33493a548a10edebf55911eb3038387800","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmobile/jazz/pulls/556/commits","review_comments_url":"https://api.github.com/repos/tmobile/jazz/pulls/556/comments","review_comment_url":"https://api.github.com/repos/tmobile/jazz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmobile/jazz/issues/556/comments","statuses_url":"https://api.github.com/repos/tmobile/jazz/statuses/38259b39a6017c3ac8870403c2a2b8415f0bedc1","head":{"label":"glearner:events","ref":"events","sha":"38259b39a6017c3ac8870403c2a2b8415f0bedc1","user":{"login":"glearner","id":29622895,"node_id":"MDQ6VXNlcjI5NjIyODk1","avatar_url":"https://avatars1.githubusercontent.com/u/29622895?v=4","gravatar_id":"","url":"https://api.github.com/users/glearner","html_url":"https://github.com/glearner","followers_url":"https://api.github.com/users/glearner/followers","following_url":"https://api.github.com/users/glearner/following{/other_user}","gists_url":"https://api.github.com/users/glearner/gists{/gist_id}","starred_url":"https://api.github.com/users/glearner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glearner/subscriptions","organizations_url":"https://api.github.com/users/glearner/orgs","repos_url":"https://api.github.com/users/glearner/repos","events_url":"https://api.github.com/users/glearner/events{/privacy}","received_events_url":"https://api.github.com/users/glearner/received_events","type":"User","site_admin":false},"repo":{"id":149432604,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk0MzI2MDQ=","name":"jazz","full_name":"glearner/jazz","private":false,"owner":{"login":"glearner","id":29622895,"node_id":"MDQ6VXNlcjI5NjIyODk1","avatar_url":"https://avatars1.githubusercontent.com/u/29622895?v=4","gravatar_id":"","url":"https://api.github.com/users/glearner","html_url":"https://github.com/glearner","followers_url":"https://api.github.com/users/glearner/followers","following_url":"https://api.github.com/users/glearner/following{/other_user}","gists_url":"https://api.github.com/users/glearner/gists{/gist_id}","starred_url":"https://api.github.com/users/glearner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glearner/subscriptions","organizations_url":"https://api.github.com/users/glearner/orgs","repos_url":"https://api.github.com/users/glearner/repos","events_url":"https://api.github.com/users/glearner/events{/privacy}","received_events_url":"https://api.github.com/users/glearner/received_events","type":"User","site_admin":false},"html_url":"https://github.com/glearner/jazz","description":"Jazz Serverless Development Platform https://opensource.t-mobile.com/blog/posts/introducing-jazz/","fork":true,"url":"https://api.github.com/repos/glearner/jazz","forks_url":"https://api.github.com/repos/glearner/jazz/forks","keys_url":"https://api.github.com/repos/glearner/jazz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glearner/jazz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glearner/jazz/teams","hooks_url":"https://api.github.com/repos/glearner/jazz/hooks","issue_events_url":"https://api.github.com/repos/glearner/jazz/issues/events{/number}","events_url":"https://api.github.com/repos/glearner/jazz/events","assignees_url":"https://api.github.com/repos/glearner/jazz/assignees{/user}","branches_url":"https://api.github.com/repos/glearner/jazz/branches{/branch}","tags_url":"https://api.github.com/repos/glearner/jazz/tags","blobs_url":"https://api.github.com/repos/glearner/jazz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glearner/jazz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glearner/jazz/git/refs{/sha}","trees_url":"https://api.github.com/repos/glearner/jazz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glearner/jazz/statuses/{sha}","languages_url":"https://api.github.com/repos/glearner/jazz/languages","stargazers_url":"https://api.github.com/repos/glearner/jazz/stargazers","contributors_url":"https://api.github.com/repos/glearner/jazz/contributors","subscribers_url":"https://api.github.com/repos/glearner/jazz/subscribers","subscription_url":"https://api.github.com/repos/glearner/jazz/subscription","commits_url":"https://api.github.com/repos/glearner/jazz/commits{/sha}","git_commits_url":"https://api.github.com/repos/glearner/jazz/git/commits{/sha}","comments_url":"https://api.github.com/repos/glearner/jazz/comments{/number}","issue_comment_url":"https://api.github.com/repos/glearner/jazz/issues/comments{/number}","contents_url":"https://api.github.com/repos/glearner/jazz/contents/{+path}","compare_url":"https://api.github.com/repos/glearner/jazz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glearner/jazz/merges","archive_url":"https://api.github.com/repos/glearner/jazz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glearner/jazz/downloads","issues_url":"https://api.github.com/repos/glearner/jazz/issues{/number}","pulls_url":"https://api.github.com/repos/glearner/jazz/pulls{/number}","milestones_url":"https://api.github.com/repos/glearner/jazz/milestones{/number}","notifications_url":"https://api.github.com/repos/glearner/jazz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glearner/jazz/labels{/name}","releases_url":"https://api.github.com/repos/glearner/jazz/releases{/id}","deployments_url":"https://api.github.com/repos/glearner/jazz/deployments","created_at":"2018-09-19T10:20:47Z","updated_at":"2018-09-19T10:20:52Z","pushed_at":"2018-09-26T14:07:37Z","git_url":"git://github.com/glearner/jazz.git","ssh_url":"git@github.com:glearner/jazz.git","clone_url":"https://github.com/glearner/jazz.git","svn_url":"https://github.com/glearner/jazz","homepage":"","size":175611,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tmobile:events","ref":"events","sha":"404c351b00bcc420ac67264db2ef20711c4d6a06","user":{"login":"tmobile","id":483040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzA0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/483040?v=4","gravatar_id":"","url":"https://api.github.com/users/tmobile","html_url":"https://github.com/tmobile","followers_url":"https://api.github.com/users/tmobile/followers","following_url":"https://api.github.com/users/tmobile/following{/other_user}","gists_url":"https://api.github.com/users/tmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmobile/subscriptions","organizations_url":"https://api.github.com/users/tmobile/orgs","repos_url":"https://api.github.com/users/tmobile/repos","events_url":"https://api.github.com/users/tmobile/events{/privacy}","received_events_url":"https://api.github.com/users/tmobile/received_events","type":"Organization","site_admin":false},"repo":{"id":95246216,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0NjIxNg==","name":"jazz","full_name":"tmobile/jazz","private":false,"owner":{"login":"tmobile","id":483040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzA0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/483040?v=4","gravatar_id":"","url":"https://api.github.com/users/tmobile","html_url":"https://github.com/tmobile","followers_url":"https://api.github.com/users/tmobile/followers","following_url":"https://api.github.com/users/tmobile/following{/other_user}","gists_url":"https://api.github.com/users/tmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmobile/subscriptions","organizations_url":"https://api.github.com/users/tmobile/orgs","repos_url":"https://api.github.com/users/tmobile/repos","events_url":"https://api.github.com/users/tmobile/events{/privacy}","received_events_url":"https://api.github.com/users/tmobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tmobile/jazz","description":"Jazz Serverless Development Platform https://opensource.t-mobile.com/blog/posts/introducing-jazz/","fork":false,"url":"https://api.github.com/repos/tmobile/jazz","forks_url":"https://api.github.com/repos/tmobile/jazz/forks","keys_url":"https://api.github.com/repos/tmobile/jazz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmobile/jazz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmobile/jazz/teams","hooks_url":"https://api.github.com/repos/tmobile/jazz/hooks","issue_events_url":"https://api.github.com/repos/tmobile/jazz/issues/events{/number}","events_url":"https://api.github.com/repos/tmobile/jazz/events","assignees_url":"https://api.github.com/repos/tmobile/jazz/assignees{/user}","branches_url":"https://api.github.com/repos/tmobile/jazz/branches{/branch}","tags_url":"https://api.github.com/repos/tmobile/jazz/tags","blobs_url":"https://api.github.com/repos/tmobile/jazz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmobile/jazz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmobile/jazz/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmobile/jazz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmobile/jazz/statuses/{sha}","languages_url":"https://api.github.com/repos/tmobile/jazz/languages","stargazers_url":"https://api.github.com/repos/tmobile/jazz/stargazers","contributors_url":"https://api.github.com/repos/tmobile/jazz/contributors","subscribers_url":"https://api.github.com/repos/tmobile/jazz/subscribers","subscription_url":"https://api.github.com/repos/tmobile/jazz/subscription","commits_url":"https://api.github.com/repos/tmobile/jazz/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmobile/jazz/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmobile/jazz/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmobile/jazz/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmobile/jazz/contents/{+path}","compare_url":"https://api.github.com/repos/tmobile/jazz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmobile/jazz/merges","archive_url":"https://api.github.com/repos/tmobile/jazz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmobile/jazz/downloads","issues_url":"https://api.github.com/repos/tmobile/jazz/issues{/number}","pulls_url":"https://api.github.com/repos/tmobile/jazz/pulls{/number}","milestones_url":"https://api.github.com/repos/tmobile/jazz/milestones{/number}","notifications_url":"https://api.github.com/repos/tmobile/jazz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmobile/jazz/labels{/name}","releases_url":"https://api.github.com/repos/tmobile/jazz/releases{/id}","deployments_url":"https://api.github.com/repos/tmobile/jazz/deployments","created_at":"2017-06-23T18:31:26Z","updated_at":"2018-09-25T02:31:05Z","pushed_at":"2018-09-26T21:52:41Z","git_url":"git://github.com/tmobile/jazz.git","ssh_url":"git@github.com:tmobile/jazz.git","clone_url":"https://github.com/tmobile/jazz.git","svn_url":"https://github.com/tmobile/jazz","homepage":"","size":175569,"stargazers_count":106,"watchers_count":106,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":54,"open_issues":29,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/556"},"html":{"href":"https://github.com/tmobile/jazz/pull/556"},"issue":{"href":"https://api.github.com/repos/tmobile/jazz/issues/556"},"comments":{"href":"https://api.github.com/repos/tmobile/jazz/issues/556/comments"},"review_comments":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/556/comments"},"review_comment":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/556/commits"},"statuses":{"href":"https://api.github.com/repos/tmobile/jazz/statuses/38259b39a6017c3ac8870403c2a2b8415f0bedc1"}},"author_association":"NONE"}}
{"actor":{"display_login":"svidhani"}}