From 2fd52c9dcf6740d35ed78c0a5d88937a13416412 Mon Sep 17 00:00:00 2001 From: gtully Date: Tue, 12 Nov 2013 16:48:06 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-4682 - add removal modification test --- .../apache/activemq/AuthorizationTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 3f12135031..ce3e71e755 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);