From commits-return-14342-archive-asf-public=cust-asf.ponee.io@airflow.incubator.apache.org Fri Apr 27 16:44:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CE954180679 for ; Fri, 27 Apr 2018 16:44:06 +0200 (CEST) Received: (qmail 88544 invoked by uid 500); 27 Apr 2018 14:44:05 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 88533 invoked by uid 99); 27 Apr 2018 14:44:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2018 14:44:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5B6FC1A29C5 for ; Fri, 27 Apr 2018 14:44:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.211 X-Spam-Level: X-Spam-Status: No, score=-4.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id YiAlS0xq-fwR for ; Fri, 27 Apr 2018 14:44:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id EC5CE5F476 for ; Fri, 27 Apr 2018 14:44:00 +0000 (UTC) Received: (qmail 86290 invoked by uid 99); 27 Apr 2018 14:44:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2018 14:44:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 136D0E965C; Fri, 27 Apr 2018 14:44:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bolke@apache.org To: commits@airflow.incubator.apache.org Message-Id: <7a880f4ddf1c422792769dc28e8916d5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-airflow git commit: [AIRFLOW-2381] Fix the flaky ApiPasswordTests test Date: Fri, 27 Apr 2018 14:44:00 +0000 (UTC) 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 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 Authored: Fri Apr 27 16:43:40 2018 +0200 Committer: Bolke de Bruin 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):