Make MongoDB tests conditional