Do not try to search if no repositories are configured

Update tests