{"action":"created","comment":{"url":"https://api.github.com/repos/threatgrid/ctia/pulls/comments/66497631","id":66497631,"diff_hunk":"@@ -188,3 +186,55 @@\n               (is (= (get-in new-bulk [k])\n                      (map #(dissoc % :created :id :type :modified :owner :tlp :version :disposition_name)\n                           (get-in (:parsed-body resp) [k])))))))))))\n+\n+(deftest get-bulk-max-size-test\n+  (let [nb 10\n+        new-bulk {:actors (map mk-new-actor (range nb))\n+                  :campaigns (map mk-new-campaign (range nb))\n+                  :coas (map mk-new-coa (range nb))\n+                  :exploit-targets (map mk-new-exploi-target (range nb))\n+                  :feedbacks (map mk-new-feedback (range nb))\n+                  :incidents (map mk-new-incident (range nb))\n+                  :indicators (map mk-new-indicator (range nb))\n+                  :judgements (map mk-new-judgement (range nb))\n+                  :sightings (map mk-new-sighting (range nb))\n+                  :ttps (map mk-new-ttp (range nb))}]\n+    (is (= (bulk-size new-bulk)\n+           (* nb 10)))))\n+\n+(deftest-for-each-store bulk-max-size-post-test\n+  (helpers/set-capabilities! \"foouser\" \"user\" all-capabilities)\n+  (whoami-helpers/set-whoami-response \"45c1f5e3f05d0\" \"foouser\" \"user\")\n+\n+  (helpers/with-properties [\"ctia.http.bulk.max-size\" 50]\n+    #(let [nb 5","path":"test/ctia/http/routes/bulk_test.clj","position":60,"original_position":60,"commit_id":"4bee513e66838769fb4cd1a772ec2e0b2ee7859e","original_commit_id":"4bee513e66838769fb4cd1a772ec2e0b2ee7859e","user":{"login":"polygloton","id":368005,"avatar_url":"https://avatars.githubusercontent.com/u/368005?v=3","gravatar_id":"","url":"https://api.github.com/users/polygloton","html_url":"https://github.com/polygloton","followers_url":"https://api.github.com/users/polygloton/followers","following_url":"https://api.github.com/users/polygloton/following{/other_user}","gists_url":"https://api.github.com/users/polygloton/gists{/gist_id}","starred_url":"https://api.github.com/users/polygloton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polygloton/subscriptions","organizations_url":"https://api.github.com/users/polygloton/orgs","repos_url":"https://api.github.com/users/polygloton/repos","events_url":"https://api.github.com/users/polygloton/events{/privacy}","received_events_url":"https://api.github.com/users/polygloton/received_events","type":"User","site_admin":false},"body":"The 'with-properties macro expects a body rather than an fn, so this test doesn't work.  (It adds syntactic sugar around 'with-properties-, which does take an fn).","created_at":"2016-06-09T18:38:27Z","updated_at":"2016-06-09T18:38:27Z","html_url":"https://github.com/threatgrid/ctia/pull/348#discussion_r66497631","pull_request_url":"https://api.github.com/repos/threatgrid/ctia/pulls/348","_links":{"self":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/comments/66497631"},"html":{"href":"https://github.com/threatgrid/ctia/pull/348#discussion_r66497631"},"pull_request":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/348"}}},"pull_request":{"url":"https://api.github.com/repos/threatgrid/ctia/pulls/348","id":73206373,"html_url":"https://github.com/threatgrid/ctia/pull/348","diff_url":"https://github.com/threatgrid/ctia/pull/348.diff","patch_url":"https://github.com/threatgrid/ctia/pull/348.patch","issue_url":"https://api.github.com/repos/threatgrid/ctia/issues/348","number":348,"state":"open","locked":false,"title":"Add a limit to bulk size.","user":{"login":"yogsototh","id":93899,"avatar_url":"https://avatars.githubusercontent.com/u/93899?v=3","gravatar_id":"","url":"https://api.github.com/users/yogsototh","html_url":"https://github.com/yogsototh","followers_url":"https://api.github.com/users/yogsototh/followers","following_url":"https://api.github.com/users/yogsototh/following{/other_user}","gists_url":"https://api.github.com/users/yogsototh/gists{/gist_id}","starred_url":"https://api.github.com/users/yogsototh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogsototh/subscriptions","organizations_url":"https://api.github.com/users/yogsototh/orgs","repos_url":"https://api.github.com/users/yogsototh/repos","events_url":"https://api.github.com/users/yogsototh/events{/privacy}","received_events_url":"https://api.github.com/users/yogsototh/received_events","type":"User","site_admin":false},"body":" Closes #326 \r\n\r\nI used a default limit of 2000 elements. @saintx does 2000 seems correct to you?","created_at":"2016-06-09T12:40:55Z","updated_at":"2016-06-09T18:38:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af8ea98ff53ba4c5f91d0af08b634b73259b8e11","assignee":{"login":"polygloton","id":368005,"avatar_url":"https://avatars.githubusercontent.com/u/368005?v=3","gravatar_id":"","url":"https://api.github.com/users/polygloton","html_url":"https://github.com/polygloton","followers_url":"https://api.github.com/users/polygloton/followers","following_url":"https://api.github.com/users/polygloton/following{/other_user}","gists_url":"https://api.github.com/users/polygloton/gists{/gist_id}","starred_url":"https://api.github.com/users/polygloton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polygloton/subscriptions","organizations_url":"https://api.github.com/users/polygloton/orgs","repos_url":"https://api.github.com/users/polygloton/repos","events_url":"https://api.github.com/users/polygloton/events{/privacy}","received_events_url":"https://api.github.com/users/polygloton/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/threatgrid/ctia/pulls/348/commits","review_comments_url":"https://api.github.com/repos/threatgrid/ctia/pulls/348/comments","review_comment_url":"https://api.github.com/repos/threatgrid/ctia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/threatgrid/ctia/issues/348/comments","statuses_url":"https://api.github.com/repos/threatgrid/ctia/statuses/4bee513e66838769fb4cd1a772ec2e0b2ee7859e","head":{"label":"yogsototh:issue-326-limit-bulk-size","ref":"issue-326-limit-bulk-size","sha":"4bee513e66838769fb4cd1a772ec2e0b2ee7859e","user":{"login":"yogsototh","id":93899,"avatar_url":"https://avatars.githubusercontent.com/u/93899?v=3","gravatar_id":"","url":"https://api.github.com/users/yogsototh","html_url":"https://github.com/yogsototh","followers_url":"https://api.github.com/users/yogsototh/followers","following_url":"https://api.github.com/users/yogsototh/following{/other_user}","gists_url":"https://api.github.com/users/yogsototh/gists{/gist_id}","starred_url":"https://api.github.com/users/yogsototh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogsototh/subscriptions","organizations_url":"https://api.github.com/users/yogsototh/orgs","repos_url":"https://api.github.com/users/yogsototh/repos","events_url":"https://api.github.com/users/yogsototh/events{/privacy}","received_events_url":"https://api.github.com/users/yogsototh/received_events","type":"User","site_admin":false},"repo":{"id":55252668,"name":"ctia","full_name":"yogsototh/ctia","owner":{"login":"yogsototh","id":93899,"avatar_url":"https://avatars.githubusercontent.com/u/93899?v=3","gravatar_id":"","url":"https://api.github.com/users/yogsototh","html_url":"https://github.com/yogsototh","followers_url":"https://api.github.com/users/yogsototh/followers","following_url":"https://api.github.com/users/yogsototh/following{/other_user}","gists_url":"https://api.github.com/users/yogsototh/gists{/gist_id}","starred_url":"https://api.github.com/users/yogsototh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogsototh/subscriptions","organizations_url":"https://api.github.com/users/yogsototh/orgs","repos_url":"https://api.github.com/users/yogsototh/repos","events_url":"https://api.github.com/users/yogsototh/events{/privacy}","received_events_url":"https://api.github.com/users/yogsototh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yogsototh/ctia","description":"Cisco Threat Intelligence API","fork":true,"url":"https://api.github.com/repos/yogsototh/ctia","forks_url":"https://api.github.com/repos/yogsototh/ctia/forks","keys_url":"https://api.github.com/repos/yogsototh/ctia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yogsototh/ctia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yogsototh/ctia/teams","hooks_url":"https://api.github.com/repos/yogsototh/ctia/hooks","issue_events_url":"https://api.github.com/repos/yogsototh/ctia/issues/events{/number}","events_url":"https://api.github.com/repos/yogsototh/ctia/events","assignees_url":"https://api.github.com/repos/yogsototh/ctia/assignees{/user}","branches_url":"https://api.github.com/repos/yogsototh/ctia/branches{/branch}","tags_url":"https://api.github.com/repos/yogsototh/ctia/tags","blobs_url":"https://api.github.com/repos/yogsototh/ctia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yogsototh/ctia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yogsototh/ctia/git/refs{/sha}","trees_url":"https://api.github.com/repos/yogsototh/ctia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yogsototh/ctia/statuses/{sha}","languages_url":"https://api.github.com/repos/yogsototh/ctia/languages","stargazers_url":"https://api.github.com/repos/yogsototh/ctia/stargazers","contributors_url":"https://api.github.com/repos/yogsototh/ctia/contributors","subscribers_url":"https://api.github.com/repos/yogsototh/ctia/subscribers","subscription_url":"https://api.github.com/repos/yogsototh/ctia/subscription","commits_url":"https://api.github.com/repos/yogsototh/ctia/commits{/sha}","git_commits_url":"https://api.github.com/repos/yogsototh/ctia/git/commits{/sha}","comments_url":"https://api.github.com/repos/yogsototh/ctia/comments{/number}","issue_comment_url":"https://api.github.com/repos/yogsototh/ctia/issues/comments{/number}","contents_url":"https://api.github.com/repos/yogsototh/ctia/contents/{+path}","compare_url":"https://api.github.com/repos/yogsototh/ctia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yogsototh/ctia/merges","archive_url":"https://api.github.com/repos/yogsototh/ctia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yogsototh/ctia/downloads","issues_url":"https://api.github.com/repos/yogsototh/ctia/issues{/number}","pulls_url":"https://api.github.com/repos/yogsototh/ctia/pulls{/number}","milestones_url":"https://api.github.com/repos/yogsototh/ctia/milestones{/number}","notifications_url":"https://api.github.com/repos/yogsototh/ctia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yogsototh/ctia/labels{/name}","releases_url":"https://api.github.com/repos/yogsototh/ctia/releases{/id}","deployments_url":"https://api.github.com/repos/yogsototh/ctia/deployments","created_at":"2016-04-01T18:11:48Z","updated_at":"2016-04-01T18:11:49Z","pushed_at":"2016-06-09T12:39:54Z","git_url":"git://github.com/yogsototh/ctia.git","ssh_url":"git@github.com:yogsototh/ctia.git","clone_url":"https://github.com/yogsototh/ctia.git","svn_url":"https://github.com/yogsototh/ctia","homepage":"","size":1842,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"threatgrid:master","ref":"master","sha":"e1cd8924bac3abab6f01308ff761c3348b41ac7f","user":{"login":"threatgrid","id":337733,"avatar_url":"https://avatars.githubusercontent.com/u/337733?v=3","gravatar_id":"","url":"https://api.github.com/users/threatgrid","html_url":"https://github.com/threatgrid","followers_url":"https://api.github.com/users/threatgrid/followers","following_url":"https://api.github.com/users/threatgrid/following{/other_user}","gists_url":"https://api.github.com/users/threatgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/threatgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threatgrid/subscriptions","organizations_url":"https://api.github.com/users/threatgrid/orgs","repos_url":"https://api.github.com/users/threatgrid/repos","events_url":"https://api.github.com/users/threatgrid/events{/privacy}","received_events_url":"https://api.github.com/users/threatgrid/received_events","type":"Organization","site_admin":false},"repo":{"id":47668849,"name":"ctia","full_name":"threatgrid/ctia","owner":{"login":"threatgrid","id":337733,"avatar_url":"https://avatars.githubusercontent.com/u/337733?v=3","gravatar_id":"","url":"https://api.github.com/users/threatgrid","html_url":"https://github.com/threatgrid","followers_url":"https://api.github.com/users/threatgrid/followers","following_url":"https://api.github.com/users/threatgrid/following{/other_user}","gists_url":"https://api.github.com/users/threatgrid/gists{/gist_id}","starred_url":"https://api.github.com/users/threatgrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threatgrid/subscriptions","organizations_url":"https://api.github.com/users/threatgrid/orgs","repos_url":"https://api.github.com/users/threatgrid/repos","events_url":"https://api.github.com/users/threatgrid/events{/privacy}","received_events_url":"https://api.github.com/users/threatgrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/threatgrid/ctia","description":"Cisco Threat Intelligence API","fork":false,"url":"https://api.github.com/repos/threatgrid/ctia","forks_url":"https://api.github.com/repos/threatgrid/ctia/forks","keys_url":"https://api.github.com/repos/threatgrid/ctia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/threatgrid/ctia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/threatgrid/ctia/teams","hooks_url":"https://api.github.com/repos/threatgrid/ctia/hooks","issue_events_url":"https://api.github.com/repos/threatgrid/ctia/issues/events{/number}","events_url":"https://api.github.com/repos/threatgrid/ctia/events","assignees_url":"https://api.github.com/repos/threatgrid/ctia/assignees{/user}","branches_url":"https://api.github.com/repos/threatgrid/ctia/branches{/branch}","tags_url":"https://api.github.com/repos/threatgrid/ctia/tags","blobs_url":"https://api.github.com/repos/threatgrid/ctia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/threatgrid/ctia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/threatgrid/ctia/git/refs{/sha}","trees_url":"https://api.github.com/repos/threatgrid/ctia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/threatgrid/ctia/statuses/{sha}","languages_url":"https://api.github.com/repos/threatgrid/ctia/languages","stargazers_url":"https://api.github.com/repos/threatgrid/ctia/stargazers","contributors_url":"https://api.github.com/repos/threatgrid/ctia/contributors","subscribers_url":"https://api.github.com/repos/threatgrid/ctia/subscribers","subscription_url":"https://api.github.com/repos/threatgrid/ctia/subscription","commits_url":"https://api.github.com/repos/threatgrid/ctia/commits{/sha}","git_commits_url":"https://api.github.com/repos/threatgrid/ctia/git/commits{/sha}","comments_url":"https://api.github.com/repos/threatgrid/ctia/comments{/number}","issue_comment_url":"https://api.github.com/repos/threatgrid/ctia/issues/comments{/number}","contents_url":"https://api.github.com/repos/threatgrid/ctia/contents/{+path}","compare_url":"https://api.github.com/repos/threatgrid/ctia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/threatgrid/ctia/merges","archive_url":"https://api.github.com/repos/threatgrid/ctia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/threatgrid/ctia/downloads","issues_url":"https://api.github.com/repos/threatgrid/ctia/issues{/number}","pulls_url":"https://api.github.com/repos/threatgrid/ctia/pulls{/number}","milestones_url":"https://api.github.com/repos/threatgrid/ctia/milestones{/number}","notifications_url":"https://api.github.com/repos/threatgrid/ctia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/threatgrid/ctia/labels{/name}","releases_url":"https://api.github.com/repos/threatgrid/ctia/releases{/id}","deployments_url":"https://api.github.com/repos/threatgrid/ctia/deployments","created_at":"2015-12-09T04:41:06Z","updated_at":"2016-06-08T00:54:01Z","pushed_at":"2016-06-09T17:30:35Z","git_url":"git://github.com/threatgrid/ctia.git","ssh_url":"git@github.com:threatgrid/ctia.git","clone_url":"https://github.com/threatgrid/ctia.git","svn_url":"https://github.com/threatgrid/ctia","homepage":"","size":1818,"stargazers_count":1,"watchers_count":1,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":63,"forks":6,"open_issues":63,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/348"},"html":{"href":"https://github.com/threatgrid/ctia/pull/348"},"issue":{"href":"https://api.github.com/repos/threatgrid/ctia/issues/348"},"comments":{"href":"https://api.github.com/repos/threatgrid/ctia/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/threatgrid/ctia/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/threatgrid/ctia/statuses/4bee513e66838769fb4cd1a772ec2e0b2ee7859e"}}}}
{"actor":{"display_login":"polygloton"}}