Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1455 [created] c427eb3a2


GEODE-1455: Add SecurityTest JUnit category to outstanding gfsh / JMX security 
tests


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

Branch: refs/heads/feature/GEODE-1455
Commit: c427eb3a204957dc0543d6dd8eabf6feb8319804
Parents: fa3a937
Author: Jens Deppe <jde...@pivotal.io>
Authored: Wed May 25 13:24:08 2016 -0700
Committer: Jens Deppe <jde...@pivotal.io>
Committed: Tue May 31 08:49:55 2016 -0700

----------------------------------------------------------------------
 .../management/internal/security/CliCommandsSecurityTest.java   | 3 ++-
 .../management/internal/security/DataCommandsSecurityTest.java  | 5 +++--
 .../security/GeodeSecurityUtilWithIniFileJUnitTest.java         | 3 ++-
 .../management/internal/security/MultiUserDUnitTest.java        | 3 ++-
 .../gemstone/gemfire/test/junit/categories/SecurityTest.java    | 2 +-
 .../internal/cli/commands/CommandOverHttpDUnitTest.java         | 3 ++-
 .../internal/security/GfshCommandsOverHttpSecurityTest.java     | 3 ++-
 7 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
index b4864e9..5edca36 100644
--- 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
+++ 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
@@ -27,6 +27,7 @@ import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.security.NotAuthorizedException;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
@@ -36,7 +37,7 @@ import org.junit.experimental.categories.Category;
 /**
  */
 
-@Category(IntegrationTest.class)
+@Category({IntegrationTest.class, SecurityTest.class})
 public class CliCommandsSecurityTest {
   private static int jmxManagerPort = 
AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java
 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java
index 9c9b4fc..01575b1 100644
--- 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java
+++ 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/DataCommandsSecurityTest.java
@@ -22,13 +22,14 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.security.GemFireSecurityException;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category(IntegrationTest.class)
+@Category({IntegrationTest.class, SecurityTest.class})
 public class DataCommandsSecurityTest {
   private static int jmxManagerPort = 
AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
 
@@ -66,7 +67,7 @@ public class DataCommandsSecurityTest {
   // dataUser has all the permissions granted, but not to region2 (only to 
region1)
   @JMXConnectionConfiguration(user = "region1-user", password = "1234567")
   @Test
-  public void testRegionAcess(){
+  public void testRegionAccess(){
     assertThatThrownBy(() -> bean.processCommand("rebalance 
--include-region=region2")).isInstanceOf(GemFireSecurityException.class)
         .hasMessageContaining(TestCommand.dataManage.toString());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
index 61c913b..d8c20eb 100644
--- 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
+++ 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
@@ -25,6 +25,7 @@ import com.gemstone.gemfire.cache.operations.OperationContext;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
 import com.gemstone.gemfire.security.GemFireSecurityException;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 import org.apache.shiro.util.ThreadContext;
@@ -37,7 +38,7 @@ import org.junit.experimental.categories.Category;
  * this test and ShiroUtilCustomRealmJUunitTest uses the same test body, but 
initialize the SecurityUtils differently.
  * If you change shiro.ini, remmber to change the shiro-ini.json to match the 
changes as well.
  */
-@Category(UnitTest.class)
+@Category({UnitTest.class, SecurityTest.class})
 public class GeodeSecurityUtilWithIniFileJUnitTest {
   protected static Properties props = new Properties();
   @BeforeClass

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
index 5b58b3c..d92f89e 100644
--- 
a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
+++ 
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
@@ -37,13 +37,14 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.jayway.awaitility.Awaitility;
 
 import org.json.JSONException;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category(DistributedTest.class)
+@Category({ DistributedTest.class, SecurityTest.class })
 public class MultiUserDUnitTest extends CliCommandTestBase {
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/categories/SecurityTest.java
----------------------------------------------------------------------
diff --git 
a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/categories/SecurityTest.java
 
b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/categories/SecurityTest.java
index 3af739e..0b0e685 100644
--- 
a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/categories/SecurityTest.java
+++ 
b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/categories/SecurityTest.java
@@ -19,5 +19,5 @@ package com.gemstone.gemfire.test.junit.categories;
 /**
  * JUnit Test Category that specifies a test involving security.
  */
-public class SecurityTest {
+public interface SecurityTest {
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CommandOverHttpDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CommandOverHttpDUnitTest.java
 
b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CommandOverHttpDUnitTest.java
index 9687eb7..8db28c4 100644
--- 
a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CommandOverHttpDUnitTest.java
+++ 
b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CommandOverHttpDUnitTest.java
@@ -18,6 +18,7 @@
 package com.gemstone.gemfire.management.internal.cli.commands;
 
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import com.gemstone.gemfire.test.junit.runner.SuiteRunner;
 
 import org.junit.ClassRule;
@@ -26,7 +27,7 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
-@Category(DistributedTest.class)
+@Category({ DistributedTest.class, SecurityTest.class })
 @RunWith(SuiteRunner.class)
 @Suite.SuiteClasses({
   ConfigCommandsDUnitTest.class,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c427eb3a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsOverHttpSecurityTest.java
----------------------------------------------------------------------
diff --git 
a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsOverHttpSecurityTest.java
 
b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsOverHttpSecurityTest.java
index af0cfad..313f31a 100644
--- 
a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsOverHttpSecurityTest.java
+++ 
b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsOverHttpSecurityTest.java
@@ -19,9 +19,10 @@ package com.gemstone.gemfire.management.internal.security;
 
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
+import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 import org.junit.experimental.categories.Category;
 
-@Category(IntegrationTest.class)
+@Category({ IntegrationTest.class, SecurityTest.class })
 public class GfshCommandsOverHttpSecurityTest extends GfshCommandsSecurityTest 
{
   public GfshCommandsOverHttpSecurityTest(){
     gfshConnection = new GfshShellConnectionRule(jmxPort, httpPort, true);

Reply via email to