diff options
Diffstat (limited to 'java/broker-plugins/access-control')
| -rw-r--r-- | java/broker-plugins/access-control/build.xml | 8 | ||||
| -rw-r--r-- | java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java | 15 |
2 files changed, 10 insertions, 13 deletions
diff --git a/java/broker-plugins/access-control/build.xml b/java/broker-plugins/access-control/build.xml index ae56abcb77..690f2fb22c 100644 --- a/java/broker-plugins/access-control/build.xml +++ b/java/broker-plugins/access-control/build.xml @@ -17,13 +17,13 @@ - under the License. --> <project name="Qpid Broker-Plugins Access Control" default="build"> - <property name="module.depends" value="common management/common broker broker-plugins" /> - <property name="module.test.depends" value="junit-toolkit broker/test" /> - + <property name="module.depends" value="common broker broker-plugins" /> + <property name="module.test.depends" value="test common/test broker/test management/common" /> + <property name="module.manifest" value="MANIFEST.MF" /> <property name="module.plugin" value="true" /> <import file="../../module.xml" /> <target name="bundle" depends="bundle-tasks" /> -</project>
\ No newline at end of file +</project> diff --git a/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java b/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java index 53485f05c5..ef541dd0a8 100644 --- a/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java +++ b/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java @@ -21,16 +21,15 @@ package org.apache.qpid.server.security.access.plugins; -import junit.framework.TestCase; import org.apache.qpid.framing.AMQShortString; -import org.apache.qpid.server.registry.ApplicationRegistry; import org.apache.qpid.server.security.Result; import org.apache.qpid.server.security.access.ObjectProperties; import org.apache.qpid.server.security.access.ObjectType; import org.apache.qpid.server.security.access.Operation; import org.apache.qpid.server.security.access.Permission; import org.apache.qpid.server.security.access.config.RuleSet; +import org.apache.qpid.server.util.InternalBrokerBaseCase; /** * This test checks that the {@link RuleSet} object which forms the core of the access control plugin performs correctly. @@ -40,7 +39,7 @@ import org.apache.qpid.server.security.access.config.RuleSet; * access control mechanism is validated by checking whether operations would be authorised by calling the * {@link RuleSet#check(String, Operation, ObjectType, ObjectProperties)} method. */ -public class RuleSetTest extends TestCase +public class RuleSetTest extends InternalBrokerBaseCase { private RuleSet _ruleSet; @@ -50,20 +49,18 @@ public class RuleSetTest extends TestCase private AMQShortString _exchangeType = new AMQShortString("direct"); @Override - public void setUp() + public void setUp() throws Exception { - // Each test will cause a new application registry and non-transitive rule set to be created - ApplicationRegistry.getInstance(); + super.setUp(); _ruleSet = new RuleSet(); _ruleSet.configure(RuleSet.TRANSITIVE, Boolean.FALSE); } @Override - protected void tearDown() throws Exception + public void tearDown() throws Exception { - // Ensure we close the opened Registry - ApplicationRegistry.remove(); _ruleSet.clear(); + super.tearDown(); } public void assertDenyGrantAllow(String identity, Operation operation, ObjectType objectType) |
