Add test for purge task and use supplied database configuration