activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [1/2] activemq-artemis git commit: NO-JIRA Adding extra assertions to make sure queue name is in the error message
Date Thu, 07 Dec 2017 12:23:34 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 7c702245f -> fdc71155c


NO-JIRA Adding extra assertions to make sure queue name is in the error message


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

Branch: refs/heads/master
Commit: 0e5b3cbdcc77ec2222bb1ae707098bd03ba7f0ed
Parents: 7c70224
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Fri Nov 24 11:30:12 2017 +0000
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Thu Dec 7 10:28:51 2017 +0000

----------------------------------------------------------------------
 .../tests/integration/security/SecurityTest.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e5b3cbd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
index 3f814e4..6ff547b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
@@ -307,7 +307,7 @@ public class SecurityTest extends ActiveMQTestBase {
          session.createQueue(ADDRESS, DURABLE_QUEUE, true);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='CREATE_DURABLE_QUEUE'
for queue durableQueue on address address"));
       }
 
       // DELETE_DURABLE_QUEUE
@@ -315,7 +315,7 @@ public class SecurityTest extends ActiveMQTestBase {
          session.deleteQueue(DURABLE_QUEUE);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='DELETE_DURABLE_QUEUE'
for queue durableQueue on address address"));
       }
 
       // CREATE_NON_DURABLE_QUEUE
@@ -323,7 +323,7 @@ public class SecurityTest extends ActiveMQTestBase {
          session.createQueue(ADDRESS, NON_DURABLE_QUEUE, false);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='CREATE_NON_DURABLE_QUEUE'
for queue nonDurableQueue on address address"));
       }
 
       // DELETE_NON_DURABLE_QUEUE
@@ -331,7 +331,7 @@ public class SecurityTest extends ActiveMQTestBase {
          session.deleteQueue(NON_DURABLE_QUEUE);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='DELETE_NON_DURABLE_QUEUE'
for queue nonDurableQueue on address address"));
       }
 
       // PRODUCE
@@ -340,7 +340,7 @@ public class SecurityTest extends ActiveMQTestBase {
          producer.send(session.createMessage(true));
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='SEND'
on address address"));
       }
 
       // CONSUME
@@ -348,7 +348,7 @@ public class SecurityTest extends ActiveMQTestBase {
          ClientConsumer consumer = session.createConsumer(DURABLE_QUEUE);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='CONSUME'
for queue durableQueue on address address"));
       }
 
       // MANAGE
@@ -357,7 +357,7 @@ public class SecurityTest extends ActiveMQTestBase {
          producer.send(session.createMessage(true));
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='MANAGE'
on address activemq.management"));
       }
 
       // BROWSE
@@ -365,7 +365,7 @@ public class SecurityTest extends ActiveMQTestBase {
          ClientConsumer browser = session.createConsumer(DURABLE_QUEUE, true);
          Assert.fail("should throw exception here");
       } catch (ActiveMQException e) {
-         // ignore
+         assertTrue(e.getMessage().contains("User: first does not have permission='BROWSE'
for queue durableQueue on address address"));
       }
    }
 


Mime
View raw message