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 2018/08/27 14:46:18 UTC

[GitHub] Fokko commented on a change in pull request #3811: [AIRFLOW-2961] Refactor tests.BackfillJobTest.test_backfill_examples test

Fokko commented on a change in pull request #3811: [AIRFLOW-2961] Refactor tests.BackfillJobTest.test_backfill_examples test
URL: https://github.com/apache/incubator-airflow/pull/3811#discussion_r213001968
 
 

 ##########
 File path: tests/jobs.py
 ##########
 @@ -194,30 +195,32 @@ def test_backfill_multi_dates(self):
     def test_backfill_examples(self):
         """
         Test backfilling example dags
-        """
 
-        # some DAGs really are just examples... but try to make them work!
-        skip_dags = [
-            'example_http_operator',
-            'example_twitter_dag',
-            'example_trigger_target_dag',
-            'example_trigger_controller_dag',  # tested above
-            'test_utils',  # sleeps forever
-            'example_kubernetes_executor',  # requires kubernetes cluster
-            'example_kubernetes_operator'  # requires kubernetes cluster
-        ]
+        Try to backfill some of the example dags. Be carefull, not all dags are suitable
+        for doing this. For example, a dag that sleeps forever, or does not have a
+        schedule won't work here since you simply can't backfill them.
+        """
+        include_dags = {
+            'example_branch_operator',
+            'example_bash_operator',
+            'example_skip_dag',
+            'latest_only'
+        }
 
-        logger = logging.getLogger('BackfillJobTest.test_backfill_examples')
         dags = [
             dag for dag in self.dagbag.dags.values()
-            if 'example_dags' in dag.full_filepath and dag.dag_id not in skip_dags
+            if 'example_dags' in dag.full_filepath and dag.dag_id in include_dags
         ]
 
         for dag in dags:
             dag.clear(
                 start_date=DEFAULT_DATE,
                 end_date=DEFAULT_DATE)
 
+        # Make sure that we have all dags the dags that we want to test available
 
 Review comment:
   Thanks, fixed 👍 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services