[ 
https://issues.apache.org/jira/browse/AIRFLOW-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631118#comment-16631118
 ] 

ASF GitHub Bot commented on AIRFLOW-3100:
-----------------------------------------

kaxil closed pull request #3933: [AIRFLOW-3100][AIRFLOW-3101] Improve docker 
compose local testing
URL: https://github.com/apache/incubator-airflow/pull/3933
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 152d5d9aab..f114c66585 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -146,9 +146,18 @@ There are three ways to setup an Apache Airflow 
development environment.
   # From the container
   pip install -e .[devel]
   # Run all the tests with python and mysql through tox
+  pip install tox
   tox -e py35-backend_mysql
   ```
 
+  If you wish to run individual tests inside of docker enviroment you can do 
as follows:
+
+  ```bash
+    # From the container (with your desired enviroment) with druid hook
+    tox -e py35-backend_mysql -- tests/hooks/test_druid_hook.py
+ ```
+
+
 ### Running unit tests
 
 To run tests locally, once your unit test environment is setup (directly on 
your
diff --git a/scripts/ci/docker-compose.yml b/scripts/ci/docker-compose.yml
index 4accf119f6..101ad95297 100644
--- a/scripts/ci/docker-compose.yml
+++ b/scripts/ci/docker-compose.yml
@@ -66,6 +66,7 @@ services:
     init: true
     environment:
       - USER=airflow
+      - ADDITIONAL_PATH=~/.local/bin
       - SLUGIFY_USES_TEXT_UNIDECODE=yes
       - TOX_ENV
       - PYTHON_VERSION
diff --git a/scripts/ci/run-ci.sh b/scripts/ci/run-ci.sh
index 1a65bf1ef6..f16ab5284d 100755
--- a/scripts/ci/run-ci.sh
+++ b/scripts/ci/run-ci.sh
@@ -32,8 +32,8 @@ else
   PIP=pip
 fi
 
-sudo $PIP install --upgrade pip
-sudo $PIP install tox
+sudo -H $PIP install --upgrade pip
+sudo -H $PIP install tox
 
 cd $AIRFLOW_ROOT && $PIP --version && tox --version
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Add instructions how to run individual tests in the docker environment 
> -----------------------------------------------------------------------
>
>                 Key: AIRFLOW-3100
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3100
>             Project: Apache Airflow
>          Issue Type: Improvement
>            Reporter: Holden Karau's magical unicorn
>            Assignee: holdenk
>            Priority: Trivial
>
> Since the docker env is now how we expect folks to run there tests, for 
> individuals who just want to verify and individual test we should tell them 
> how to do that.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to