The testing framework uses a default connection string of
mongodb://localhost
Which does not work when run against a replica set, at least not when 27017 is not the primary.
If no connection string is provided to the testing framework (via an environment variable), the testing framework should probe the server at 27017 and use the following connection string instead if the server at 27017 is a member of a replica set:
mongodb://localhost/?connect=replicaSet