[Build Failure] OIDC tests need to update to use camelCase options

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 4.14
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      KeyError: 'authmechanismproperties'

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_auth_oidc_ubuntu_22_test_auth_oidc_azure_3be7f76763464fe55f710ee427369197a21c0843_25_07_15_20_38_15/logs?execution=0

      Context of when and why the failure occurred:

      PYTHON-5421

      Stack trace:

      [2025/07/15 18:07:51.115]     def get_token(self, username=None):
       [2025/07/15 18:07:51.115]         """Get a token for the current provider."""
       [2025/07/15 18:07:51.115]         if ENVIRON == "test":
       [2025/07/15 18:07:51.115]             if username is None:
       [2025/07/15 18:07:51.115]                 token_file = TOKEN_FILE
       [2025/07/15 18:07:51.115]             else:
       [2025/07/15 18:07:51.115]                 token_file = os.path.join(TOKEN_DIR, username)
       [2025/07/15 18:07:51.115]             with open(token_file) as fid:  # noqa: ASYNC101,RUF100
       [2025/07/15 18:07:51.115]                 return fid.read()
       [2025/07/15 18:07:51.115]         elif ENVIRON == "azure":
       [2025/07/15 18:07:51.115]             opts = parse_uri(self.uri_single)["options"]
       [2025/07/15 18:07:51.115] >           token_aud = opts["authmechanismproperties"]["TOKEN_RESOURCE"]
       [2025/07/15 18:07:51.115] E           KeyError: 'authmechanismproperties'
       [2025/07/15 18:07:51.115] test/test_auth_oidc.py:95: KeyError
      

              Assignee:
              Steve Silvester
              Reporter:
              Steve Silvester
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: