falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sowmya...@apache.org
Subject falcon git commit: FALCON-2115 UT test failure on FalconCSRFFilterTest
Date Fri, 12 Aug 2016 22:01:43 GMT
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 <yzheng@hortonworks.com>

Reviewers: "Sowmya Ramesh <sowmya_kr@apache.org>"

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 <yzheng@hortonworks.com>
Authored: Fri Aug 12 15:01:39 2016 -0700
Committer: Sowmya Ramesh <sramesh@hortonworks.com>
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();


Mime
View raw message