Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B23A7200B62 for ; Sat, 13 Aug 2016 00:01:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B0FDC160AB0; Fri, 12 Aug 2016 22:01:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 055C1160A85 for ; Sat, 13 Aug 2016 00:01:43 +0200 (CEST) Received: (qmail 75079 invoked by uid 500); 12 Aug 2016 22:01:43 -0000 Mailing-List: contact commits-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list commits@falcon.apache.org Received: (qmail 75070 invoked by uid 99); 12 Aug 2016 22:01:43 -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, 12 Aug 2016 22:01:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 028E2DFBAA; Fri, 12 Aug 2016 22:01:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sowmya_kr@apache.org To: commits@falcon.apache.org Message-Id: <1343f7cbf1d640888d0fc66963ffa2bb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: falcon git commit: FALCON-2115 UT test failure on FalconCSRFFilterTest Date: Fri, 12 Aug 2016 22:01:43 +0000 (UTC) archived-at: Fri, 12 Aug 2016 22:01:44 -0000 Repository: falcon Updated Branches: refs/heads/master cb473b4fb -> 2bea7f474 FALCON-2115 UT test failure on FalconCSRFFilterTest Need to add the property falcon.security.csrf.header to startup properties when testing custom header for CSRF filter. Author: yzheng-hortonworks Reviewers: "Sowmya Ramesh " Closes #262 from yzheng-hortonworks/FALCON-2115 Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/2bea7f47 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/2bea7f47 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/2bea7f47 Branch: refs/heads/master Commit: 2bea7f4742374e6b38228a798a4ab7fbf2d18507 Parents: cb473b4 Author: yzheng-hortonworks Authored: Fri Aug 12 15:01:39 2016 -0700 Committer: Sowmya Ramesh Committed: Fri Aug 12 15:01:39 2016 -0700 ---------------------------------------------------------------------- .../java/org/apache/falcon/security/FalconCSRFFilterTest.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/2bea7f47/prism/src/test/java/org/apache/falcon/security/FalconCSRFFilterTest.java ---------------------------------------------------------------------- diff --git a/prism/src/test/java/org/apache/falcon/security/FalconCSRFFilterTest.java b/prism/src/test/java/org/apache/falcon/security/FalconCSRFFilterTest.java index f20e0be..aecbe2e 100644 --- a/prism/src/test/java/org/apache/falcon/security/FalconCSRFFilterTest.java +++ b/prism/src/test/java/org/apache/falcon/security/FalconCSRFFilterTest.java @@ -57,6 +57,7 @@ public class FalconCSRFFilterTest { @Test public void testCSRFEnabledAllowedMethodFromBrowser() throws Exception { StartupProperties.get().setProperty("falcon.security.csrf.enabled", "true"); + StartupProperties.get().setProperty("falcon.security.csrf.header", FALCON_CSRF_HEADER_DEFAULT); mockHeader("Mozilla/5.0", null); mockGetMethod(); mockRunFilter(); @@ -67,6 +68,7 @@ public class FalconCSRFFilterTest { @Test public void testCSRFEnabledNoCustomHeaderFromBrowser() throws Exception { StartupProperties.get().setProperty("falcon.security.csrf.enabled", "true"); + StartupProperties.get().setProperty("falcon.security.csrf.header", FALCON_CSRF_HEADER_DEFAULT); mockHeader("Mozilla/5.0", null); mockDeleteMethod(); mockRunFilter(); @@ -77,6 +79,7 @@ public class FalconCSRFFilterTest { @Test public void testCSRFEnabledIncludeCustomHeaderFromBrowser() throws Exception { StartupProperties.get().setProperty("falcon.security.csrf.enabled", "true"); + StartupProperties.get().setProperty("falcon.security.csrf.header", FALCON_CSRF_HEADER_DEFAULT); mockHeader("Mozilla/5.0", ""); mockDeleteMethod(); mockRunFilter(); @@ -87,6 +90,7 @@ public class FalconCSRFFilterTest { @Test public void testCSRFEnabledAllowNonBrowserInteractionWithoutHeader() throws Exception { StartupProperties.get().setProperty("falcon.security.csrf.enabled", "true"); + StartupProperties.get().setProperty("falcon.security.csrf.header", FALCON_CSRF_HEADER_DEFAULT); mockHeader(null, null); mockDeleteMethod(); mockRunFilter(); @@ -97,6 +101,7 @@ public class FalconCSRFFilterTest { @Test public void testCSRFDisabledAllowAnyMethodFromBrowser() throws Exception { StartupProperties.get().setProperty("falcon.security.csrf.enabled", "false"); + StartupProperties.get().setProperty("falcon.security.csrf.header", FALCON_CSRF_HEADER_DEFAULT); mockHeader("Mozilla/5.0", null); mockDeleteMethod(); mockRunFilter();