You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by sa...@apache.org on 2016/11/25 08:03:33 UTC

incubator-airflow git commit: [AIRFLOW-653] Add some missing endpoint tests

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 8f4473c5d -> 7f0bf577b


[AIRFLOW-653] Add some missing endpoint tests

WebUiTests lack tests for some endpoints.
This commit adds tests for /admin/airflow/headers,
/admin/airflow/noaccess and
/admin/airflow/pickle_info.

Dear Airflow Maintainers,

Please accept this PR that addresses the following
issues:
-
https://issues.apache.org/jira/browse/AIRFLOW-653

Testing Done:
- All unit tests passed.

WebUiTests lack tests for some endpoints.
This commit adds tests for /admin/airflow/headers,
/admin/airflow/noaccess and
/admin/airflow/pickle_info.

Closes #1903 from sekikn/AIRFLOW-653


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/7f0bf577
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/7f0bf577
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/7f0bf577

Branch: refs/heads/master
Commit: 7f0bf577bb07fea6b9a9b975e3316be7e1de0e7c
Parents: 8f4473c
Author: Kengo Seki <se...@apache.org>
Authored: Fri Nov 25 00:02:32 2016 -0800
Committer: Siddharth Anand <si...@yahoo.com>
Committed: Fri Nov 25 00:02:50 2016 -0800

----------------------------------------------------------------------
 tests/core.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/7f0bf577/tests/core.py
----------------------------------------------------------------------
diff --git a/tests/core.py b/tests/core.py
index 2799740..24315f1 100644
--- a/tests/core.py
+++ b/tests/core.py
@@ -1356,6 +1356,18 @@ class WebUiTests(unittest.TestCase):
         response = self.app.get('/health')
         assert 'The server is healthy!' in response.data.decode('utf-8')
 
+    def test_headers(self):
+        response = self.app.get('/admin/airflow/headers')
+        assert '"headers":' in response.data.decode('utf-8')
+
+    def test_noaccess(self):
+        response = self.app.get('/admin/airflow/noaccess')
+        assert "You don't seem to have access." in response.data.decode('utf-8')
+
+    def test_pickle_info(self):
+        response = self.app.get('/admin/airflow/pickle_info')
+        assert '{' in response.data.decode('utf-8')
+
     def test_dag_views(self):
         response = self.app.get(
             '/admin/airflow/graph?dag_id=example_bash_operator')