{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/228815982","pull_request_review_id":169159908,"id":228815982,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODgxNTk4Mg==","diff_hunk":"@@ -1310,90 +1576,79 @@ namespace iroha {\n       ASSERT_EQ(\"1.0\", account_asset.get()->balance().toStringRepr());\n     }\n \n-    /**\n-     * @given  command\n-     * @when trying to subtract account asset\n-     * @then account asset is successfully subtracted\n-     */\n-    TEST_F(SubtractAccountAssetTest,\n-           InvalidSubtractAccountAssetTestWhenNoPerms) {\n-      addAsset();\n-      ASSERT_TRUE(\n-          val(execute(buildCommand(TestTransactionBuilder()\n-                                       .addAssetQuantity(asset_id, \"1.0\")\n-                                       .creatorAccountId(account->accountId())),\n-                      true)));\n-      auto account_asset =\n-          query->getAccountAsset(account->accountId(), asset_id);\n-      ASSERT_TRUE(account_asset);\n-      ASSERT_EQ(\"1.0\", account_asset.get()->balance().toStringRepr());\n-      ASSERT_TRUE(err(\n-          execute(buildCommand(TestTransactionBuilder()\n-                                   .subtractAssetQuantity(asset_id, \"1.0\")\n-                                   .creatorAccountId(account->accountId())))));\n-      account_asset = query->getAccountAsset(account->accountId(), asset_id);\n-      ASSERT_TRUE(account_asset);\n-      ASSERT_EQ(\"1.0\", account_asset.get()->balance().toStringRepr());\n-    }\n-\n     /**\n      * @given  command\n      * @when trying to subtract account asset with non-existing asset\n      * @then account asset fails to be subtracted\n      */\n     TEST_F(SubtractAccountAssetTest, SubtractAccountAssetTestInvalidAsset) {\n       addAllPerms();\n-      ASSERT_TRUE(err(\n+      auto cmd_result =\n           execute(buildCommand(TestTransactionBuilder()\n                                    .subtractAssetQuantity(asset_id, \"1.0\")\n-                                   .creatorAccountId(account->accountId())))));\n+                                   .creatorAccountId(account->accountId())));\n+      checkErrorCode(cmd_result, 3);\n     }\n \n     /**\n      * @given  command\n-     * @when trying to add account subtract with non-existing account\n-     * @then account asset fails to subtracted\n+     * @when trying to add account asset with wrong precision\n+     * @then account asset fails to added","path":"test/module/irohad/ametsuchi/postgres_executor_test.cpp","position":940,"original_position":940,"commit_id":"efaeb6c948c8d9849482b72a94186c056249838c","original_commit_id":"efaeb6c948c8d9849482b72a94186c056249838c","user":{"login":"nickaleks","id":14168731,"node_id":"MDQ6VXNlcjE0MTY4NzMx","avatar_url":"https://avatars0.githubusercontent.com/u/14168731?v=4","gravatar_id":"","url":"https://api.github.com/users/nickaleks","html_url":"https://github.com/nickaleks","followers_url":"https://api.github.com/users/nickaleks/followers","following_url":"https://api.github.com/users/nickaleks/following{/other_user}","gists_url":"https://api.github.com/users/nickaleks/gists{/gist_id}","starred_url":"https://api.github.com/users/nickaleks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickaleks/subscriptions","organizations_url":"https://api.github.com/users/nickaleks/orgs","repos_url":"https://api.github.com/users/nickaleks/repos","events_url":"https://api.github.com/users/nickaleks/events{/privacy}","received_events_url":"https://api.github.com/users/nickaleks/received_events","type":"User","site_admin":false},"body":"fails to be added","created_at":"2018-10-29T07:01:45Z","updated_at":"2018-10-29T07:04:20Z","html_url":"https://github.com/hyperledger/iroha/pull/1813#discussion_r228815982","pull_request_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1813","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/228815982"},"html":{"href":"https://github.com/hyperledger/iroha/pull/1813#discussion_r228815982"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1813"}}},"pull_request":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/1813","id":226084171,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MDg0MTcx","html_url":"https://github.com/hyperledger/iroha/pull/1813","diff_url":"https://github.com/hyperledger/iroha/pull/1813.diff","patch_url":"https://github.com/hyperledger/iroha/pull/1813.patch","issue_url":"https://api.github.com/repos/hyperledger/iroha/issues/1813","number":1813,"state":"open","locked":false,"title":"Stateful Error Code in Postgres Command Executor","user":{"login":"Akvinikym","id":16174976,"node_id":"MDQ6VXNlcjE2MTc0OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/16174976?v=4","gravatar_id":"","url":"https://api.github.com/users/Akvinikym","html_url":"https://github.com/Akvinikym","followers_url":"https://api.github.com/users/Akvinikym/followers","following_url":"https://api.github.com/users/Akvinikym/following{/other_user}","gists_url":"https://api.github.com/users/Akvinikym/gists{/gist_id}","starred_url":"https://api.github.com/users/Akvinikym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akvinikym/subscriptions","organizations_url":"https://api.github.com/users/Akvinikym/orgs","repos_url":"https://api.github.com/users/Akvinikym/repos","events_url":"https://api.github.com/users/Akvinikym/events{/privacy}","received_events_url":"https://api.github.com/users/Akvinikym/received_events","type":"User","site_admin":false},"body":"### Description of the Change\r\n\r\nIntroduce error codes to Postgres Command Executor. Error codes are described in the following [POW](https://soramitsu.atlassian.net/wiki/spaces/IS/pages/439189508/POW+N+075+Stateful+response). \r\n\r\n### Benefits\r\n\r\nMore secure and easier to parse by client\r\n\r\n### Possible Drawbacks \r\n\r\nNone.","created_at":"2018-10-26T12:41:47Z","updated_at":"2018-10-29T07:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b91279bac72d9c37f8ebfebaf722c407cb5e1262","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lebdron","id":14347159,"node_id":"MDQ6VXNlcjE0MzQ3MTU5","avatar_url":"https://avatars1.githubusercontent.com/u/14347159?v=4","gravatar_id":"","url":"https://api.github.com/users/lebdron","html_url":"https://github.com/lebdron","followers_url":"https://api.github.com/users/lebdron/followers","following_url":"https://api.github.com/users/lebdron/following{/other_user}","gists_url":"https://api.github.com/users/lebdron/gists{/gist_id}","starred_url":"https://api.github.com/users/lebdron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lebdron/subscriptions","organizations_url":"https://api.github.com/users/lebdron/orgs","repos_url":"https://api.github.com/users/lebdron/repos","events_url":"https://api.github.com/users/lebdron/events{/privacy}","received_events_url":"https://api.github.com/users/lebdron/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1813/commits","review_comments_url":"https://api.github.com/repos/hyperledger/iroha/pulls/1813/comments","review_comment_url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/iroha/issues/1813/comments","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/efaeb6c948c8d9849482b72a94186c056249838c","head":{"label":"hyperledger:feature/cmd-exec-err-codes","ref":"feature/cmd-exec-err-codes","sha":"efaeb6c948c8d9849482b72a94186c056249838c","user":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"node_id":"MDEwOlJlcG9zaXRvcnk2NzM0MDU3NQ==","name":"iroha","full_name":"hyperledger/iroha","private":false,"owner":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-10-26T19:21:43Z","pushed_at":"2018-10-29T06:21:26Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":56315,"stargazers_count":959,"watchers_count":959,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":305,"mirror_url":null,"archived":false,"open_issues_count":55,"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":305,"open_issues":55,"watchers":959,"default_branch":"master"}},"base":{"label":"hyperledger:dev","ref":"dev","sha":"d521b3ea5151a7f8d79b132a66bfc47dbabc154d","user":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"node_id":"MDEwOlJlcG9zaXRvcnk2NzM0MDU3NQ==","name":"iroha","full_name":"hyperledger/iroha","private":false,"owner":{"login":"hyperledger","id":7657900,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2NTc5MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-10-26T19:21:43Z","pushed_at":"2018-10-29T06:21:26Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":56315,"stargazers_count":959,"watchers_count":959,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":305,"mirror_url":null,"archived":false,"open_issues_count":55,"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":305,"open_issues":55,"watchers":959,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1813"},"html":{"href":"https://github.com/hyperledger/iroha/pull/1813"},"issue":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/1813"},"comments":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/1813/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1813/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/1813/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/iroha/statuses/efaeb6c948c8d9849482b72a94186c056249838c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nickaleks"}}