Shrividya commented on code in PR #64105:
URL: https://github.com/apache/airflow/pull/64105#discussion_r2976770230
##########
providers/git/tests/unit/git/hooks/test_git.py:
##########
@@ -352,3 +352,19 @@ def test_passphrase_askpass_cleaned_up(self,
create_connection_without_db):
assert os.path.exists(askpass_path)
# Both the askpass script and the temp key file should be cleaned up
assert not os.path.exists(askpass_path)
+
+ def test_token_askpass_env_and_cleanup(self):
+ hook = GitHook(git_conn_id=CONN_HTTPS)
+ askpass_path = None
+
+ with hook.configure_hook_env():
+ assert "GIT_ASKPASS" in hook.env
+ askpass_path = hook.env["GIT_ASKPASS"]
+ assert os.path.exists(askpass_path)
+
+ with open(askpass_path) as f:
+ content = f.read()
+ assert f"echo '{ACCESS_TOKEN}'" in content
Review Comment:
nit: better to add escape sequence to the single quote here.
--
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]