Taragolis commented on code in PR #37337:
URL: https://github.com/apache/airflow/pull/37337#discussion_r1485631064


##########
tests/providers/hashicorp/_internal_client/test_vault_client.py:
##########
@@ -551,6 +552,19 @@ def test_token(self, mock_hvac):
         assert 2 == vault_client.kv_engine_version
         assert "secret" == vault_client.mount_point
 
+    
@mock.patch("airflow.providers.hashicorp._internal_client.vault_client.hvac")
+    def test_token_in_env(self, mock_hvac):
+        mock_client = mock.MagicMock()
+        mock_hvac.Client.return_value = mock_client
+        os.environ["VAULT_TOKEN"] = "s.7AU0I51yv1Q1lxOIg1F3ZRAS"

Review Comment:
   ```suggestion
   ```



##########
tests/providers/hashicorp/_internal_client/test_vault_client.py:
##########
@@ -16,6 +16,7 @@
 # under the License.
 from __future__ import annotations
 
+import os

Review Comment:
   ```suggestion
   ```



##########
tests/providers/hashicorp/_internal_client/test_vault_client.py:
##########
@@ -551,6 +552,19 @@ def test_token(self, mock_hvac):
         assert 2 == vault_client.kv_engine_version
         assert "secret" == vault_client.mount_point
 
+    
@mock.patch("airflow.providers.hashicorp._internal_client.vault_client.hvac")
+    def test_token_in_env(self, mock_hvac):

Review Comment:
   ```suggestion
       def test_token_in_env(self, mock_hvac, monkeypatch):
           monkeypatch.setenv("VAULT_TOKEN", "s.7AU0I51yv1Q1lxOIg1F3ZRAS")
   ```



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