Realised that the reposCollection field in ConfigDatabase must be refreshed every time it is used, but we don't want this when we are testing.