fpopic commented on code in PR #53801:
URL: https://github.com/apache/airflow/pull/53801#discussion_r2934852517


##########
providers/hashicorp/tests/unit/hashicorp/_internal_client/test_vault_client.py:
##########
@@ -321,29 +318,75 @@ def mocked_json_dumps(payload):
         # Assert iat and exp values are as expected
         assert payload["iat"] == iat
         assert payload["exp"] == exp
+        assert payload["sub"] == "service_account_email"
         assert abs(payload["exp"] - (payload["iat"] + 3600)) < 10  # Validate 
exp is 3600 seconds after iat
 
         client.auth.gcp.login.assert_called_with(role="role", jwt="mocked_jwt")
         client.is_authenticated.assert_called_with()
         assert vault_client.kv_engine_version == 2
 
-    @mock.patch("builtins.open", create=True)
+    
@mock.patch("airflow.providers.google.cloud.utils.credentials_provider._get_scopes")
+    
@mock.patch("airflow.providers.google.cloud.utils.credentials_provider.get_credentials_and_project_id")
+    
@mock.patch("airflow.providers.hashicorp._internal_client.vault_client.hvac.Client")
+    @mock.patch("googleapiclient.discovery.build")
+    def test_gcp_adc(self, mock_google_build, mock_hvac_client, 
mock_get_credentials, mock_get_scopes):

Review Comment:
   added additional test for gcp adc, existing is for gcp key



-- 
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]

Reply via email to