xloya commented on code in PR #4011: URL: https://github.com/apache/gravitino/pull/4011#discussion_r1666434823
########## clients/client-python/tests/unittests/auth/test_oauth2_token_provider.py: ########## @@ -0,0 +1,79 @@ +""" +Copyright 2024 Datastrato Pvt Ltd. +This software is licensed under the Apache License version 2. +""" + +import unittest +from unittest.mock import patch + +from gravitino.auth.auth_constants import AuthConstants +from gravitino.auth.default_oauth_to_token_provider import DefaultOAuth2TokenProvider +from tests.unittests.auth import mock_base + +OAUTH_PORT = 1082 + + +class TestOAuth2TokenProvider(unittest.TestCase): Review Comment: I see. I think we also need to test abnormal cases, such as using an expired token to access the Server again, which should be rejected. I am not sure whether it is convenient to test the expired token to access the Server in a unit test. If it is not convenient, I think you can add a test case for authentication failure when using an expired token to access the Server in the integration tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
