GitHub PullRequestReviewCommentEvent at 2014-08-08 15:10:27
Repository: fiware-orion
Actor: fgalan
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/15997803","id":15997803,"diff_hunk":"@@ -0,0 +1,1227 @@\n+/*\n+*\n+* Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U\n+*\n+* This file is part of Orion Context Broker.\n+*\n+* Orion Context Broker is free software: you can redistribute it and/or\n+* modify it under the terms of the GNU Affero General Public License as\n+* published by the Free Software Foundation, either version 3 of the\n+* License, or (at your option) any later version.\n+*\n+* Orion Context Broker is distributed in the hope that it will be useful,\n+* but WITHOUT ANY WARRANTY; without even the implied warranty of\n+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n+* General Public License for more details.\n+*\n+* You should have received a copy of the GNU Affero General Public License\n+* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.\n+*\n+* For those usages not covered by this license please contact with\n+* fermin at tid dot es\n+*\n+* Author: Fermin Galan\n+*/\n+#include \"unittest.h\"\n+\n+#include \"logMsg/logMsg.h\"\n+#include \"logMsg/traceLevels.h\"\n+\n+#include \"common/globals.h\"\n+#include \"mongoBackend/MongoGlobal.h\"\n+#include \"mongoBackend/mongoQueryContext.h\"\n+#include \"ngsi10/QueryContextRequest.h\"\n+#include \"ngsi10/QueryContextResponse.h\"\n+\n+#include \"mongo/client/dbclient.h\"\n+\n+/* ****************************************************************************\n+*\n+* Tests\n+*\n+* These test are based on the ones in the mongoDiscoverContextAvailability_test.cpp file\n+*\n+* With isPattern=false:\n+*\n+* - noPatternAttrsAll - discover all the attributes of an entity in the same registration\n+* - noPatternAttrOneSingle - discover one attribute (single result)\n+* - noPatternAttrOneMulti -  discover one attribute (multiple result)\n+* - noPatternAttrsSubset - discover a subset of the attributes of an entity in the same\n+*   registration\n+* - noPatternSeveralCREs - discover registration information covering two\n+*   contextRegistrationElements in the same registration\n+* - noPatternSeveralRegistrations - discover registration information covering two different\n+*   registrations\n+* - noPatternNoEntity - discover with not existing entity\n+* - noPatternNoAttribute - discover with existing entity but not attribute\n+* - noPatternMultiEntity - several entities (and no attributes) in the discover\n+* - noPatternMultiAttr - single entity and several attributes in the discover\n+* - noPatternMultiEntityAttrs - several entities and attributes in the discover\n+* - noPatternNoType - discover entities without specifying type\n+*\n+* With isPattern=true:\n+*\n+* - pattern0Attr\n+* - pattern1AttrSingle\n+* - pattern1AttrMulti\n+* - patternNAttr\n+* - patternFail\n+* - patternNoType\n+* - mixPatternAndNotPattern\n+*\n+* Note these tests are not \"canonical\" unit tests. Canon says that in this case we should have\n+* mocked MongoDB. Actually, we think is very much powerfull to check that everything is ok at\n+* MongoDB layer.\n+*\n+*/\n+\n+#define NO_CODE 0\n+\n+/* ****************************************************************************\n+*\n+* prepareDatabase -\n+*\n+* This function is called before every test, to populate some information in the\n+* registrations collection.\n+*/\n+static void prepareDatabase(void) {","path":"test/unittests/mongoBackend/mongoContextProvidersQuery_test.cpp","position":null,"original_position":87,"commit_id":"434ec4c83e3386873f756d6befdc7508cd712708","original_commit_id":"fc87bde8924ecb38def551fe21c26bb2669fba2e","user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=2","gravatar_id":"1936b0d16210811a2aa8de96295f0693","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"body":"Fixed in 61336c8916608d93dee6be2530b5e8ef5757d768","created_at":"2014-08-08T15:10:27Z","updated_at":"2014-08-08T15:10:27Z","html_url":"https://github.com/telefonicaid/fiware-orion/pull/503#discussion_r15997803","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/15997803"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/503#discussion_r15997803"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503"}}},"pull_request":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503","id":19478132,"html_url":"https://github.com/telefonicaid/fiware-orion/pull/503","diff_url":"https://github.com/telefonicaid/fiware-orion/pull/503.diff","patch_url":"https://github.com/telefonicaid/fiware-orion/pull/503.patch","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/503","number":503,"state":"open","title":"mongoBackend \"redirect\" to context provideres for queryContext and updateContext operations","user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=2","gravatar_id":"1936b0d16210811a2aa8de96295f0693","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"body":"This PR comprises the part of issue #499 regarding mongoBackend.","created_at":"2014-08-07T16:29:57Z","updated_at":"2014-08-08T15:10:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1cbd74990420753835b1453e4eb8bbea0d05c65","assignee":{"login":"kzangeli","id":5338380,"avatar_url":"https://avatars.githubusercontent.com/u/5338380?v=2","gravatar_id":"219ceb8e935c4c592687383e471b6310","url":"https://api.github.com/users/kzangeli","html_url":"https://github.com/kzangeli","followers_url":"https://api.github.com/users/kzangeli/followers","following_url":"https://api.github.com/users/kzangeli/following{/other_user}","gists_url":"https://api.github.com/users/kzangeli/gists{/gist_id}","starred_url":"https://api.github.com/users/kzangeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzangeli/subscriptions","organizations_url":"https://api.github.com/users/kzangeli/orgs","repos_url":"https://api.github.com/users/kzangeli/repos","events_url":"https://api.github.com/users/kzangeli/events{/privacy}","received_events_url":"https://api.github.com/users/kzangeli/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503/commits","review_comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503/comments","review_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/{number}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/503/comments","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/434ec4c83e3386873f756d6befdc7508cd712708","head":{"label":"telefonicaid:task/mongobackend_redirect_response","ref":"task/mongobackend_redirect_response","sha":"434ec4c83e3386873f756d6befdc7508cd712708","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FI-WARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/{number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2014-07-06T03:22:50Z","pushed_at":"2014-08-08T15:09:42Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fi-ware.eu/enablers/publishsubscribe-context-broker-orion-context-broker","size":15275,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":9,"mirror_url":null,"open_issues_count":78,"forks":9,"open_issues":78,"watchers":7,"default_branch":"develop"}},"base":{"label":"telefonicaid:feature/499_basic_ctx_providers","ref":"feature/499_basic_ctx_providers","sha":"b0b8b43d95089f888f01016982d4bd4af469a01e","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=2","gravatar_id":"05c84be2ce3d0a014ac4253156a1eaff","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FI-WARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/{number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2014-07-06T03:22:50Z","pushed_at":"2014-08-08T15:09:42Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fi-ware.eu/enablers/publishsubscribe-context-broker-orion-context-broker","size":15275,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":9,"mirror_url":null,"open_issues_count":78,"forks":9,"open_issues":78,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/503"},"issue":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/503"},"comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/503/comments"},"review_comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503/comments"},"review_comment":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/503/commits"},"statuses":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/434ec4c83e3386873f756d6befdc7508cd712708"}}}}