Bug 24229: Avoid fetching ALL items in test
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 20 May 2020 22:04:24 +0000 (19:04 -0300)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Fri, 12 Jun 2020 00:26:11 +0000 (00:26 +0000)
commit98d895e53d8315a2e921ceb51b43ac42a58c8d51
treed1985a3256555532ada95756573e9f14422bba44
parent04fc143d25f743b9d58c6fd1f28ba1d9cd0216cb
Bug 24229: Avoid fetching ALL items in test

I'm not sure what we need to test here, besides we get results. I'm
pretty sure we shouldn't allow a plain GET return all objects because it
could cause a DOS very easily. But it certainly belongs to a separate
bug/discussion.

In this case, I put a constraint on the items domain (by using
_per_page=10 in the query params) so it won't happen that under certain
conditions the user agent used by Test::Mojo time outs.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 85ab68c07f9240eba08d74b232be8434e65e9afb)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
t/db_dependent/api/v1/items.t