Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2973

Test Failure - MONGODB-AWS Auth InvalidURI: Bad database name

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.0
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

       [2021/10/27 08:14:02.281] + python test/auth_aws/test_auth_aws.py
       [2021/10/27 08:14:02.281] EEE
       [2021/10/27 08:14:02.281] ======================================================================
       [2021/10/27 08:14:02.281] ERROR: test_connect_uri (__main__.TestAuthAWS)
       [2021/10/27 08:14:02.281] ----------------------------------------------------------------------
       [2021/10/27 08:14:02.281] Traceback (most recent call last):
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/test/auth_aws/test_auth_aws.py", line 51, in test_connect_uri
       [2021/10/27 08:14:02.281]     with MongoClient(self.uri) as client:
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/pymongo/mongo_client.py", line 670, in __init__
       [2021/10/27 08:14:02.281]     res = uri_parser.parse_uri(
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/pymongo/uri_parser.py", line 491, in parse_uri
       [2021/10/27 08:14:02.281]     raise InvalidURI('Bad database name "%s"' % dbase)
       [2021/10/27 08:14:02.281] pymongo.errors.InvalidURI: Bad database name "vD0CKXtRPruBjSsT+ZpHjZqHYPy@localhost/aws"
       [2021/10/27 08:14:02.281] ======================================================================
       [2021/10/27 08:14:02.281] ERROR: test_should_fail_incorrect_credentials (__main__.TestAuthAWS)
       [2021/10/27 08:14:02.281] ----------------------------------------------------------------------
       [2021/10/27 08:14:02.281] Traceback (most recent call last):
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/test/auth_aws/test_auth_aws.py", line 45, in test_should_fail_incorrect_credentials
       [2021/10/27 08:14:02.281]     with MongoClient(self.uri, username='fake', password='fake',
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/pymongo/mongo_client.py", line 670, in __init__
       [2021/10/27 08:14:02.281]     res = uri_parser.parse_uri(
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/pymongo/uri_parser.py", line 491, in parse_uri
       [2021/10/27 08:14:02.281]     raise InvalidURI('Bad database name "%s"' % dbase)
       [2021/10/27 08:14:02.281] pymongo.errors.InvalidURI: Bad database name "vD0CKXtRPruBjSsT+ZpHjZqHYPy@localhost/aws"
       [2021/10/27 08:14:02.281] ======================================================================
       [2021/10/27 08:14:02.281] ERROR: test_should_fail_without_credentials (__main__.TestAuthAWS)
       [2021/10/27 08:14:02.281] ----------------------------------------------------------------------
       [2021/10/27 08:14:02.281] Traceback (most recent call last):
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/test/auth_aws/test_auth_aws.py", line 38, in test_should_fail_without_credentials
       [2021/10/27 08:14:02.281]     hosts = ['%s:%s' % addr for addr in parse_uri(self.uri)['nodelist']]
       [2021/10/27 08:14:02.281]   File "/data/mci/879a7e69d54a132ac196113ac56a02da/src/pymongo/uri_parser.py", line 491, in parse_uri
       [2021/10/27 08:14:02.281]     raise InvalidURI('Bad database name "%s"' % dbase)
       [2021/10/27 08:14:02.281] pymongo.errors.InvalidURI: Bad database name "vD0CKXtRPruBjSsT+ZpHjZqHYPy@localhost/aws"
       [2021/10/27 08:14:02.281] ----------------------------------------------------------------------
       [2021/10/27 08:14:02.281] Ran 3 tests in 0.001s
       [2021/10/27 08:14:02.281] FAILED (errors=3)
      

      https://evergreen.mongodb.com/task/mongo_python_driver_aws_auth_test__platform~macos_1014_python_version~system_python3_aws_auth_test_latest_eabd2235ba1ebc24c26109b11477f59292f367dd_21_10_26_21_24_27

      Note that the password accidentally included the error message is ephemeral.

            Assignee:
            julius.park@mongodb.com Julius Park (Inactive)
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: