]> git.koha-community.org Git - koha.git/commit
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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 22 May 2020 08:33:18 +0000 (09:33 +0100)
commit85ab68c07f9240eba08d74b232be8434e65e9afb
tree364f4d0ca6cc3248ebcbec3ecf6616deb0d5c950
parent9e665fb9a753032fed711959f1d8cc5780655b8c
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>
t/db_dependent/api/v1/items.t