You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/05/23 05:52:29 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #5310: [ AIRFLOW-4554] Test for sudo command, add some other test docs

potiuk commented on a change in pull request #5310: [ AIRFLOW-4554] Test for sudo command, add some other test docs
URL: https://github.com/apache/airflow/pull/5310#discussion_r286784599
 
 

 ##########
 File path: run_unit_tests.sh
 ##########
 @@ -61,8 +61,13 @@ if [ -f "${AIRFLOW_DB}" ]; then
 fi
 
 # For impersonation tests on Travis, make airflow accessible to other users via the global PATH
-# (which contains /usr/local/bin)
-sudo ln -sf "${VIRTUAL_ENV}/bin/airflow" /usr/local/bin/
+# (which contains /usr/local/bin).  Some test environments, like the docker instructions, won't have sudo and
+# are probably running as root anyway
+if which sudo > /dev/null; then
 
 Review comment:
   'which' is not the best way as . Better/portable way is `command -v`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services