uranusjr commented on a change in pull request #19609:
URL: https://github.com/apache/airflow/pull/19609#discussion_r749871301
##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -320,3 +320,11 @@ def append_matching_path_callback(list_):
)
return files, dirs, unknowns
+
+ def test_connection(self) -> Tuple[bool, str]:
+ """Test the SFTP connection by checking if remote entity '/some/path'
exists"""
+ try:
+ self.path_exists('/some/path')
Review comment:
I think this can be made slightly cheaper to
```suggestion
self.get_conn().pwd
```
--
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]