airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-2381] Fix the flaky ApiPasswordTests test
Date Fri, 27 Apr 2018 14:44:00 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/v1-10-test cb264e940 -> 4d64ad492


[AIRFLOW-2381] Fix the flaky ApiPasswordTests test

This test is in conflict with different tests
running in parallel
By calling a simple overview page, the behaviour
of checking the
password is still checked, but isn't dependent on
a specific dag
being present in the database

Closes #3269 from Fokko/AIRFLOW-2381

(cherry picked from commit 414a08e505e2ae86f4272bfc8b0d28d66ef6ab6a)
Signed-off-by: Bolke de Bruin <bolke@xs4all.nl>


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

Branch: refs/heads/v1-10-test
Commit: 4d64ad4928f0188f7532936e8da6612f5ec7170d
Parents: cb264e9
Author: Fokko Driesprong <fokkodriesprong@godatadriven.com>
Authored: Fri Apr 27 16:43:40 2018 +0200
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Fri Apr 27 16:43:55 2018 +0200

----------------------------------------------------------------------
 .../api/experimental/test_password_endpoints.py  | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/4d64ad49/tests/www/api/experimental/test_password_endpoints.py
----------------------------------------------------------------------
diff --git a/tests/www/api/experimental/test_password_endpoints.py b/tests/www/api/experimental/test_password_endpoints.py
index ecddff1..8131ff5 100644
--- a/tests/www/api/experimental/test_password_endpoints.py
+++ b/tests/www/api/experimental/test_password_endpoints.py
@@ -7,9 +7,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -56,24 +56,15 @@ class ApiPasswordTests(unittest.TestCase):
 
     def test_authorized(self):
         with self.app.test_client() as c:
-            url_template = '/api/experimental/dags/{}/dag_runs'
-            response = c.post(
-                url_template.format('example_bash_operator'),
-                data=json.dumps(dict(run_id='my_run' + datetime.now().isoformat())),
-                content_type="application/json",
+            response = c.get(
+                '/api/experimental/pools',
                 headers={'Authorization': 'Basic aGVsbG86d29ybGQ='}  # hello:world
             )
             self.assertEqual(200, response.status_code)
 
     def test_unauthorized(self):
         with self.app.test_client() as c:
-            url_template = '/api/experimental/dags/{}/dag_runs'
-            response = c.post(
-                url_template.format('example_bash_operator'),
-                data=json.dumps(dict(run_id='my_run' + datetime.now().isoformat())),
-                content_type="application/json"
-            )
-
+            response = c.get('/api/experimental/pools')
             self.assertEqual(401, response.status_code)
 
     def tearDown(self):


Mime
View raw message