Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-522

Some integration tests don't respect MONGODB_URI

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      It looks like there are integration tests that fail because they don't respect MONGDOB_URI. Example: with a server running on 27017 without auth, the tests fails to connect, even though the MONGODB_URI server supports auth.

      $ AUTH=auth MONGODB_URI="mongodb://root:toor@metis.local:64506/?authMechanism=SCRAM-SHA-256&authSource=admin" go test ./core/integration
      --- FAIL: TestTopologyServer (0.03s)
       --- FAIL: TestTopologyServer/Disconnect (0.01s)
       --- FAIL: TestTopologyServer/Disconnect/all_open_sockets_should_be_closed_after_disconnect (0.01s)
       server_test.go:187: Unepexted error: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.
       --- FAIL: TestTopologyServer/Shouldn't_be_able_to_get_more_than_max_connections (0.01s)
       server_test.go:56: Unepexted error: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.
      --- FAIL: TestCommand (0.01s)
       command_test.go:44: Unepexted error: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.
      FAIL
      FAIL github.com/mongodb/mongo-go-driver/core/integration 1.947s
      

      When run with no server on 27017, the following errors occur:

      --- FAIL: TestCompression (0.05s)
              compressor_test.go:93: Unexpected error: element not found
      --- FAIL: TestConnection (0.00s)
          --- FAIL: TestConnection/Initialize (0.00s)
              connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/ReadWrite (0.00s)
              connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/Expired (0.00s)
              --- FAIL: TestConnection/Expired/Idle_Timeout (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
              --- FAIL: TestConnection/Expired/Lifetime_Timeout (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/WriteContext (0.00s)
              --- FAIL: TestConnection/WriteContext/Cancel (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
              --- FAIL: TestConnection/WriteContext/Timeout (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/Write_After_Connection_Dead (0.00s)
              connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/ReadContext (0.00s)
              --- FAIL: TestConnection/ReadContext/Cancel (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
              --- FAIL: TestConnection/ReadContext/Timeout (0.00s)
                      connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestConnection/Read_After_Connection_Dead (0.00s)
              connection_test.go:189: failed dialing mongodb server - ensure that one is running at 127.0.0.1:27017: dial tcp 127.0.0.1:27017: connect: connection refused
      --- FAIL: TestPool (0.00s)
          --- FAIL: TestPool/Reuses_Connections (0.00s)
              pool_test.go:63: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestPool/Expired_Connections_Aren't_Returned (0.00s)
              pool_test.go:84: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestPool/Connection_Close_Does_Not_Error_After_Pool_Is_Closed (0.00s)
              pool_test.go:146: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestPool/Drain_Expires_Existing_Checked_Out_Connections (0.00s)
              pool_test.go:176: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
      --- FAIL: TestTopologyServer (0.00s)
          --- FAIL: TestTopologyServer/Disconnect (0.00s)
              --- FAIL: TestTopologyServer/Disconnect/all_open_sockets_should_be_closed_after_disconnect (0.00s)
                      server_test.go:187: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
          --- FAIL: TestTopologyServer/Shouldn't_be_able_to_get_more_than_max_connections (0.00s)
              server_test.go:56: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
      --- FAIL: TestCommand (0.00s)
              command_test.go:44: Unepexted error: dial tcp 127.0.0.1:27017: connect: connection refused
      FAIL
      FAIL    github.com/mongodb/mongo-go-driver/core/integration     1.571s
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: