Skip to content
Snippets Groups Projects
  1. Dec 24, 2024
  2. Nov 26, 2024
  3. Oct 10, 2024
  4. Jun 22, 2024
  5. May 05, 2024
  6. Apr 10, 2024
  7. Mar 17, 2024
  8. Mar 12, 2024
  9. Mar 01, 2024
  10. Jan 21, 2024
    • Chih-Hsuan Yen's avatar
      Disable parallel tests to avoid a flaky failure · aa11a7de
      Chih-Hsuan Yen authored
      ____________ TestIdentity.test_introspect_signed_id_token_0_success ____________
      [gw16] linux -- Python 3.11.6 /usr/bin/python
      
      a = (<tests.integration_tests.api.secrets_engines.test_identity.TestIdentity testMethod=test_introspect_signed_id_token_0_success>,)
      
          @wraps(func)
          def standalone_func(*a):
      >       return func(*(a + p.args), **p.kwargs)
      
      /usr/lib/python3.11/site-packages/parameterized/parameterized.py:533:
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      tests/integration_tests/api/secrets_engines/test_identity.py:2152: in test_introspect_signed_id_token
          self.client.secrets.identity.create_or_update_role(
      hvac/api/secrets_engines/identity.py:1478: in create_or_update_role
          return self._adapter.post(
      hvac/adapters.py:159: in post
          return self.request("post", url, **kwargs)
      hvac/adapters.py:408: in request
          response = super().request(*args, **kwargs)
      hvac/adapters.py:376: in request
          self._raise_for_error(method, url, response)
      hvac/adapters.py:294: in _raise_for_error
          utils.raise_for_error(
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      
      method = 'post', url = 'https://127.0.0.1:50299/v1/identity/oidc/role/hvac'
      status_code = 400, message = None, errors = ['cannot find key "hvac_key"']
      text = '{"errors":["cannot find key \\"hvac_key\\""]}\n'
      json = {'errors': ['cannot find key "hvac_key"']}
      
          def raise_for_error(
              method, url, status_code, message=None, errors=None, text=None, json=None
          ):
              """Helper method to raise exceptions based on the status code of a response received back from Vault.
      
              :param method: HTTP method of a request to Vault.
              :type method: str
              :param url: URL of the endpoint requested in Vault.
              :type url: str
              :param status_code: Status code received in a response from Vault.
              :type status_code: int
              :param message: Optional message to include in a resulting exception.
              :type message: str
              :param errors: Optional errors to include in a resulting exception.
              :type errors: list | str
              :param text: Optional text of the response.
              :type text: str
              :param json: Optional deserialized version of a JSON response (object)
              :type json: object
      
              :raises: hvac.exceptions.InvalidRequest | hvac.exceptions.Unauthorized | hvac.exceptions.Forbidden |
                  hvac.exceptions.InvalidPath | hvac.exceptions.RateLimitExceeded | hvac.exceptions.InternalServerError |
                  hvac.exceptions.VaultNotInitialized | hvac.exceptions.BadGateway | hvac.exceptions.VaultDown |
                  hvac.exceptions.UnexpectedError
      
              """
      >       raise exceptions.VaultError.from_status(
                  status_code,
                  message,
                  errors=errors,
                  method=method,
                  url=url,
                  text=text,
                  json=json,
              )
      E       hvac.exceptions.InvalidRequest: cannot find key "hvac_key", on post https://127.0.0.1:50299/v1/identity/oidc/role/hvac
      
      hvac/utils.py:41: InvalidRequest
      aa11a7de
  11. Jan 19, 2024
  12. Nov 19, 2023
  13. Sep 24, 2023
  14. Sep 09, 2023
  15. Aug 31, 2023
  16. Jun 25, 2023
  17. Apr 09, 2023
  18. Mar 17, 2023
  19. Nov 12, 2022
  20. Oct 29, 2022
  21. Sep 19, 2022
  22. Jul 11, 2022
  23. Dec 09, 2021
  24. Dec 01, 2021
  25. Sep 30, 2021
  26. Jul 16, 2021
  27. Jun 25, 2021
Loading