https://issues.apache.org/jira/browse/AMQ-4682 - add removal modification test


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/219a83f7
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/219a83f7
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/219a83f7

Branch: refs/heads/activemq-5.9
Commit: 219a83f750d90849447249af82149e9875b15a03
Parents: 747ea16
Author: gtully <[email protected]>
Authored: Tue Nov 12 16:48:06 2013 +0000
Committer: Hadrian Zbarcea <[email protected]>
Committed: Wed Mar 12 10:26:08 2014 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/AuthorizationTest.java   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/219a83f7/activemq-runtime-config/src/test/java/org/apache/activemq/AuthorizationTest.java
----------------------------------------------------------------------
diff --git 
a/activemq-runtime-config/src/test/java/org/apache/activemq/AuthorizationTest.java
 
b/activemq-runtime-config/src/test/java/org/apache/activemq/AuthorizationTest.java
index 3f12135..ce3e71e 100644
--- 
a/activemq-runtime-config/src/test/java/org/apache/activemq/AuthorizationTest.java
+++ 
b/activemq-runtime-config/src/test/java/org/apache/activemq/AuthorizationTest.java
@@ -49,6 +49,25 @@ public class AuthorizationTest extends 
RuntimeConfigTestSupport {
         assertAllowedTemp("guest");
     }
 
+    @Test
+    public void testModRm() throws Exception {
+        final String brokerConfig = configurationSeed + "-auth-rm-broker";
+        applyNewConfig(brokerConfig, configurationSeed + "-users-guests");
+        startBroker(brokerConfig);
+        assertTrue("broker alive", brokerService.isStarted());
+
+        assertAllowed("user", "USERS.A");
+        assertAllowed("guest", "GUESTS.A");
+        assertDenied("user", "GUESTS.A");
+        assertAllowedTemp("guest");
+
+        applyNewConfig(brokerConfig, configurationSeed + "-users", SLEEP);
+
+        assertAllowed("user", "USERS.A");
+        assertDenied("user", "GUESTS.A");
+        assertDeniedTemp("guest");
+    }
+
     private void assertDeniedTemp(String userPass) {
         try {
             assertAllowedTemp(userPass);

Reply via email to