As described in #210, the URL cleaning cronjob always fails on production.
Root cause
When we bump elasticsearch client in #153, there was a breaking change that wraps return value of elasticsearch client with an extra {body: }.
At that time we updated all elasticsearch client return values that unit test covered; unfortunately, there is one call-site of elasticsearch client not updated. The call site will not be executed until there are more than 100 urls to scan and delete.
Proposed fix
Add 100 more fixture for cleanupUrls so that it fails unit test
Coverage increased (+0.4%) to 88.582% when pulling f7f59ca8aa602bd990831912844ee06ace755da6 on fix-cleanup-url into a437fae1a9b9ae9339e1fed8e847bc6faf054642 on master.
Fixes #210.
As described in #210, the URL cleaning cronjob always fails on production.
Root cause
When we bump elasticsearch client in #153, there was a breaking change that wraps return value of elasticsearch client with an extra
{body: }
.At that time we updated all elasticsearch client return values that unit test covered; unfortunately, there is one call-site of elasticsearch client not updated. The call site will not be executed until there are more than 100
urls
to scan and delete.Proposed fix
cleanupUrls
so that it fails unit testcleanupUrls
to make test pass