{"action":"created","comment":{"url":"https://api.github.com/repos/thehyve/transmart-core/pulls/comments/204333119","pull_request_review_id":139391876,"id":204333119,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDMzMzExOQ==","diff_hunk":"@@ -0,0 +1,358 @@\n+package org.transmartproject.rest.v2\n+\n+import groovy.util.logging.Slf4j\n+import org.springframework.beans.factory.annotation.Autowired\n+import org.springframework.beans.factory.annotation.Qualifier\n+import org.springframework.http.HttpStatus\n+import org.transmartproject.core.log.AccessLogEntry\n+import org.transmartproject.core.log.AccessLogEntryResource\n+import org.transmartproject.interceptors.ApiAuditInterceptor\n+import org.transmartproject.mock.MockAccessLogEntryResource\n+import org.transmartproject.rest.BusinessExceptionController\n+import spock.lang.Unroll\n+\n+import static org.springframework.http.HttpMethod.*\n+\n+@Slf4j\n+class ApiAuditInterceptorSpec extends V2ResourceSpec {","path":"transmart-rest-api/src/func-test/groovy/org/transmartproject/rest/v2/ApiAuditInterceptorSpec.groovy","position":17,"original_position":17,"commit_id":"27fecbdc1b90cb6e1129c5f546d55ff1b4501f3c","original_commit_id":"27fecbdc1b90cb6e1129c5f546d55ff1b4501f3c","user":{"login":"gijskant","id":7373499,"node_id":"MDQ6VXNlcjczNzM0OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7373499?v=4","gravatar_id":"","url":"https://api.github.com/users/gijskant","html_url":"https://github.com/gijskant","followers_url":"https://api.github.com/users/gijskant/followers","following_url":"https://api.github.com/users/gijskant/following{/other_user}","gists_url":"https://api.github.com/users/gijskant/gists{/gist_id}","starred_url":"https://api.github.com/users/gijskant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijskant/subscriptions","organizations_url":"https://api.github.com/users/gijskant/orgs","repos_url":"https://api.github.com/users/gijskant/repos","events_url":"https://api.github.com/users/gijskant/events{/privacy}","received_events_url":"https://api.github.com/users/gijskant/received_events","type":"User","site_admin":false},"body":"The main reason to switch from unit test to integration test is that the unit testing framework has difficulty to handle mandatory autowired dependencies. It would be nice if the grails testing framework offers easy mocking of injected beans, like the comination of JUnit, Spring testing and Mockito does.\r\nIt now checks if something is written to the log service, instead of matching of calls. It looks like the interceptor causes asynchronous behaviour, whithout the `sleep(1000)` I got errors. I will try if they are still needed.","created_at":"2018-07-23T09:16:07Z","updated_at":"2018-07-23T09:16:08Z","html_url":"https://github.com/thehyve/transmart-core/pull/281#discussion_r204333119","pull_request_url":"https://api.github.com/repos/thehyve/transmart-core/pulls/281","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/comments/204333119"},"html":{"href":"https://github.com/thehyve/transmart-core/pull/281#discussion_r204333119"},"pull_request":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/thehyve/transmart-core/pulls/281","id":203026762,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMDI2NzYy","html_url":"https://github.com/thehyve/transmart-core/pull/281","diff_url":"https://github.com/thehyve/transmart-core/pull/281.diff","patch_url":"https://github.com/thehyve/transmart-core/pull/281.patch","issue_url":"https://api.github.com/repos/thehyve/transmart-core/issues/281","number":281,"state":"open","locked":false,"title":"Refactor subscription and audit log","user":{"login":"gijskant","id":7373499,"node_id":"MDQ6VXNlcjczNzM0OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7373499?v=4","gravatar_id":"","url":"https://api.github.com/users/gijskant","html_url":"https://github.com/gijskant","followers_url":"https://api.github.com/users/gijskant/followers","following_url":"https://api.github.com/users/gijskant/following{/other_user}","gists_url":"https://api.github.com/users/gijskant/gists{/gist_id}","starred_url":"https://api.github.com/users/gijskant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijskant/subscriptions","organizations_url":"https://api.github.com/users/gijskant/orgs","repos_url":"https://api.github.com/users/gijskant/repos","events_url":"https://api.github.com/users/gijskant/events{/privacy}","received_events_url":"https://api.github.com/users/gijskant/received_events","type":"User","site_admin":false},"body":"-  Refactor user query saving and subscription functionality. \r\n- Fix audit logging: include username, log failures.","created_at":"2018-07-21T20:59:21Z","updated_at":"2018-07-23T09:16:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b88570586b8dae0a90b5dc471d82f8100d5c3759","assignee":null,"assignees":[],"requested_reviewers":[{"login":"forus","id":492175,"node_id":"MDQ6VXNlcjQ5MjE3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/492175?v=4","gravatar_id":"","url":"https://api.github.com/users/forus","html_url":"https://github.com/forus","followers_url":"https://api.github.com/users/forus/followers","following_url":"https://api.github.com/users/forus/following{/other_user}","gists_url":"https://api.github.com/users/forus/gists{/gist_id}","starred_url":"https://api.github.com/users/forus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forus/subscriptions","organizations_url":"https://api.github.com/users/forus/orgs","repos_url":"https://api.github.com/users/forus/repos","events_url":"https://api.github.com/users/forus/events{/privacy}","received_events_url":"https://api.github.com/users/forus/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/thehyve/transmart-core/milestones/2","html_url":"https://github.com/thehyve/transmart-core/milestone/2","labels_url":"https://api.github.com/repos/thehyve/transmart-core/milestones/2/labels","id":3502756,"node_id":"MDk6TWlsZXN0b25lMzUwMjc1Ng==","number":2,"title":"Release candidate for transmart-api-server ","description":"Create a release candidate for testing the transmart-api-server component, and its integration with Keycloak (as identity provider) and Glowing Bear (user interface).","creator":{"login":"gijskant","id":7373499,"node_id":"MDQ6VXNlcjczNzM0OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7373499?v=4","gravatar_id":"","url":"https://api.github.com/users/gijskant","html_url":"https://github.com/gijskant","followers_url":"https://api.github.com/users/gijskant/followers","following_url":"https://api.github.com/users/gijskant/following{/other_user}","gists_url":"https://api.github.com/users/gijskant/gists{/gist_id}","starred_url":"https://api.github.com/users/gijskant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijskant/subscriptions","organizations_url":"https://api.github.com/users/gijskant/orgs","repos_url":"https://api.github.com/users/gijskant/repos","events_url":"https://api.github.com/users/gijskant/events{/privacy}","received_events_url":"https://api.github.com/users/gijskant/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":7,"state":"open","created_at":"2018-07-17T12:54:27Z","updated_at":"2018-07-21T20:59:48Z","due_on":"2018-07-20T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/thehyve/transmart-core/pulls/281/commits","review_comments_url":"https://api.github.com/repos/thehyve/transmart-core/pulls/281/comments","review_comment_url":"https://api.github.com/repos/thehyve/transmart-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thehyve/transmart-core/issues/281/comments","statuses_url":"https://api.github.com/repos/thehyve/transmart-core/statuses/27fecbdc1b90cb6e1129c5f546d55ff1b4501f3c","head":{"label":"thehyve:refactor-subscription-and-audit-log","ref":"refactor-subscription-and-audit-log","sha":"27fecbdc1b90cb6e1129c5f546d55ff1b4501f3c","user":{"login":"thehyve","id":1502440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1502440?v=4","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"repo":{"id":87283439,"node_id":"MDEwOlJlcG9zaXRvcnk4NzI4MzQzOQ==","name":"transmart-core","full_name":"thehyve/transmart-core","owner":{"login":"thehyve","id":1502440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1502440?v=4","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thehyve/transmart-core","description":"Core components and documentation of the tranSMART platform. http://transmartfoundation.org","fork":false,"url":"https://api.github.com/repos/thehyve/transmart-core","forks_url":"https://api.github.com/repos/thehyve/transmart-core/forks","keys_url":"https://api.github.com/repos/thehyve/transmart-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehyve/transmart-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehyve/transmart-core/teams","hooks_url":"https://api.github.com/repos/thehyve/transmart-core/hooks","issue_events_url":"https://api.github.com/repos/thehyve/transmart-core/issues/events{/number}","events_url":"https://api.github.com/repos/thehyve/transmart-core/events","assignees_url":"https://api.github.com/repos/thehyve/transmart-core/assignees{/user}","branches_url":"https://api.github.com/repos/thehyve/transmart-core/branches{/branch}","tags_url":"https://api.github.com/repos/thehyve/transmart-core/tags","blobs_url":"https://api.github.com/repos/thehyve/transmart-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehyve/transmart-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehyve/transmart-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehyve/transmart-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehyve/transmart-core/statuses/{sha}","languages_url":"https://api.github.com/repos/thehyve/transmart-core/languages","stargazers_url":"https://api.github.com/repos/thehyve/transmart-core/stargazers","contributors_url":"https://api.github.com/repos/thehyve/transmart-core/contributors","subscribers_url":"https://api.github.com/repos/thehyve/transmart-core/subscribers","subscription_url":"https://api.github.com/repos/thehyve/transmart-core/subscription","commits_url":"https://api.github.com/repos/thehyve/transmart-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehyve/transmart-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehyve/transmart-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehyve/transmart-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehyve/transmart-core/contents/{+path}","compare_url":"https://api.github.com/repos/thehyve/transmart-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehyve/transmart-core/merges","archive_url":"https://api.github.com/repos/thehyve/transmart-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehyve/transmart-core/downloads","issues_url":"https://api.github.com/repos/thehyve/transmart-core/issues{/number}","pulls_url":"https://api.github.com/repos/thehyve/transmart-core/pulls{/number}","milestones_url":"https://api.github.com/repos/thehyve/transmart-core/milestones{/number}","notifications_url":"https://api.github.com/repos/thehyve/transmart-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehyve/transmart-core/labels{/name}","releases_url":"https://api.github.com/repos/thehyve/transmart-core/releases{/id}","deployments_url":"https://api.github.com/repos/thehyve/transmart-core/deployments","created_at":"2017-04-05T08:07:13Z","updated_at":"2018-07-19T12:40:22Z","pushed_at":"2018-07-21T20:59:22Z","git_url":"git://github.com/thehyve/transmart-core.git","ssh_url":"git@github.com:thehyve/transmart-core.git","clone_url":"https://github.com/thehyve/transmart-core.git","svn_url":"https://github.com/thehyve/transmart-core","homepage":null,"size":352338,"stargazers_count":7,"watchers_count":7,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9,"open_issues":7,"watchers":7,"default_branch":"dev"}},"base":{"label":"thehyve:dev","ref":"dev","sha":"53b4e10ad6c10e7b9d0b97fd2bc4aabceb44aefd","user":{"login":"thehyve","id":1502440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1502440?v=4","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"repo":{"id":87283439,"node_id":"MDEwOlJlcG9zaXRvcnk4NzI4MzQzOQ==","name":"transmart-core","full_name":"thehyve/transmart-core","owner":{"login":"thehyve","id":1502440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI0NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1502440?v=4","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thehyve/transmart-core","description":"Core components and documentation of the tranSMART platform. http://transmartfoundation.org","fork":false,"url":"https://api.github.com/repos/thehyve/transmart-core","forks_url":"https://api.github.com/repos/thehyve/transmart-core/forks","keys_url":"https://api.github.com/repos/thehyve/transmart-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehyve/transmart-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehyve/transmart-core/teams","hooks_url":"https://api.github.com/repos/thehyve/transmart-core/hooks","issue_events_url":"https://api.github.com/repos/thehyve/transmart-core/issues/events{/number}","events_url":"https://api.github.com/repos/thehyve/transmart-core/events","assignees_url":"https://api.github.com/repos/thehyve/transmart-core/assignees{/user}","branches_url":"https://api.github.com/repos/thehyve/transmart-core/branches{/branch}","tags_url":"https://api.github.com/repos/thehyve/transmart-core/tags","blobs_url":"https://api.github.com/repos/thehyve/transmart-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehyve/transmart-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehyve/transmart-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehyve/transmart-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehyve/transmart-core/statuses/{sha}","languages_url":"https://api.github.com/repos/thehyve/transmart-core/languages","stargazers_url":"https://api.github.com/repos/thehyve/transmart-core/stargazers","contributors_url":"https://api.github.com/repos/thehyve/transmart-core/contributors","subscribers_url":"https://api.github.com/repos/thehyve/transmart-core/subscribers","subscription_url":"https://api.github.com/repos/thehyve/transmart-core/subscription","commits_url":"https://api.github.com/repos/thehyve/transmart-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehyve/transmart-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehyve/transmart-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehyve/transmart-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehyve/transmart-core/contents/{+path}","compare_url":"https://api.github.com/repos/thehyve/transmart-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehyve/transmart-core/merges","archive_url":"https://api.github.com/repos/thehyve/transmart-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehyve/transmart-core/downloads","issues_url":"https://api.github.com/repos/thehyve/transmart-core/issues{/number}","pulls_url":"https://api.github.com/repos/thehyve/transmart-core/pulls{/number}","milestones_url":"https://api.github.com/repos/thehyve/transmart-core/milestones{/number}","notifications_url":"https://api.github.com/repos/thehyve/transmart-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehyve/transmart-core/labels{/name}","releases_url":"https://api.github.com/repos/thehyve/transmart-core/releases{/id}","deployments_url":"https://api.github.com/repos/thehyve/transmart-core/deployments","created_at":"2017-04-05T08:07:13Z","updated_at":"2018-07-19T12:40:22Z","pushed_at":"2018-07-21T20:59:22Z","git_url":"git://github.com/thehyve/transmart-core.git","ssh_url":"git@github.com:thehyve/transmart-core.git","clone_url":"https://github.com/thehyve/transmart-core.git","svn_url":"https://github.com/thehyve/transmart-core","homepage":null,"size":352338,"stargazers_count":7,"watchers_count":7,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9,"open_issues":7,"watchers":7,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/281"},"html":{"href":"https://github.com/thehyve/transmart-core/pull/281"},"issue":{"href":"https://api.github.com/repos/thehyve/transmart-core/issues/281"},"comments":{"href":"https://api.github.com/repos/thehyve/transmart-core/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thehyve/transmart-core/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/thehyve/transmart-core/statuses/27fecbdc1b90cb6e1129c5f546d55ff1b4501f3c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gijskant"}}