summaryrefslogtreecommitdiff
path: root/java/broker/src/test
diff options
context:
space:
mode:
authorMarnie McCormack <marnie@apache.org>2009-04-10 15:14:29 +0000
committerMarnie McCormack <marnie@apache.org>2009-04-10 15:14:29 +0000
commitf9ebbf2933e48e35303f10c3a92d2e2852980870 (patch)
tree7c73741e20e0a6677644a7ec5b174f5d8ddbdaff /java/broker/src/test
parent66842ae89dbba038937bb3a1da641c24c7a1dcd1 (diff)
downloadqpid-python-f9ebbf2933e48e35303f10c3a92d2e2852980870.tar.gz
QPID-1801 Added method to show failure to PrincipalPermissionsTest.java and then adjusted the ternary operator in PrincipalPermissions.java to ensure we don't pass a null into the map (see JIRA descriptions).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@763959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/test')
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java b/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
index 56a3783126..1ff3e5a880 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
@@ -107,7 +107,16 @@ public class PrincipalPermissionsTest extends TestCase
_perms.grant(Permission.CREATEQUEUE, grantArgs);
assertEquals(AuthzResult.ALLOWED, _perms.authorise(Permission.CREATEQUEUE, authArgs));
}
-
+
+ public void testQueueCreateWithNullRoutingKey()
+ {
+ Object[] grantArgs = new Object[]{_temporary , _queueName, _exchangeName, null};
+ Object[] authArgs = new Object[]{_autoDelete, _queueName};
+
+ assertEquals(AuthzResult.DENIED, _perms.authorise(Permission.CREATEQUEUE, authArgs));
+ _perms.grant(Permission.CREATEQUEUE, grantArgs);
+ assertEquals(AuthzResult.ALLOWED, _perms.authorise(Permission.CREATEQUEUE, authArgs));
+ }
// FIXME disabled, this fails due to grant putting the grant into the wrong map QPID-1598
public void disableTestExchangeCreate()