Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3068

Specs Fail When Using Non-Standard Port for mongod

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      I've been unable to run the specs because Mongoid is attempting to use the standard mongod port and I'm running Mongo on a non-standard port. I've tried setting the MONGOID_SPEC_PORT environment variable, but it doesn't seem to affect the outcome one bit. Every test failure is because of a Moped connection issue:

      Moped::Errors::ConnectionFailure:
             Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
      

      It appears the default session is using 27017 as a hardcoded port value and that causes a lot of the failures - changing this to my port fixes some of the issues, but I believe it's hardcoded elsewhere as I get the same error for different tests.

      Am I missing something really obvious here or are the tests not designed to work on non-standard ports? I'd be happy to work on a PR to solve this issue if someone can provide some guidance.

            Assignee:
            durran Durran Jordan
            Reporter:
            todd Todd Blose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: