summaryrefslogtreecommitdiff
path: root/java/systests
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2010-06-17 14:37:59 +0000
committerRobert Gemmell <robbie@apache.org>2010-06-17 14:37:59 +0000
commit097f6a0e13ac6a650b574329fc3b20bfe5553cdd (patch)
treecdb7c89e62dd551bc83064641a9dd75199135c11 /java/systests
parentf383975c33ab31adc84383e75422314e1e2a03ce (diff)
downloadqpid-python-097f6a0e13ac6a650b574329fc3b20bfe5553cdd.tar.gz
QPID-2662: Use actual SocketAddress instead of the String representation
Applied patch from Andrew Kennedy <andrew.international@gmail.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@955617 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
-rw-r--r--java/systests/etc/config-systests-ServerConfigurationTest-New.xml2
-rw-r--r--java/systests/etc/config-systests-ServerConfigurationTest-Old.xml2
-rw-r--r--java/systests/etc/config-systests-firewall-2.xml6
-rw-r--r--java/systests/etc/config-systests-firewall-3.xml2
-rw-r--r--java/systests/etc/virtualhosts-systests-firewall-2.xml8
-rw-r--r--java/systests/etc/virtualhosts-systests-firewall-3.xml4
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java18
7 files changed, 25 insertions, 17 deletions
diff --git a/java/systests/etc/config-systests-ServerConfigurationTest-New.xml b/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
index 1ce9e7d8fa..d1dce019dd 100644
--- a/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
+++ b/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
@@ -24,6 +24,8 @@
<work>${QPID_WORK}</work>
<conf>${QPID_HOME}/etc</conf>
<passwordDir>${conf}</passwordDir>
+ <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
+ <cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<transport>nio</transport>
<port>5672</port>
diff --git a/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml b/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
index 8a685c1b0d..1de0389533 100644
--- a/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
+++ b/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
@@ -24,6 +24,8 @@
<work>${QPID_WORK}</work>
<conf>${QPID_HOME}/etc</conf>
<passwordDir>${conf}</passwordDir>
+<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
+<cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<transport>nio</transport>
<port>5672</port>
diff --git a/java/systests/etc/config-systests-firewall-2.xml b/java/systests/etc/config-systests-firewall-2.xml
index 276f7eac71..38ff9ddbb0 100644
--- a/java/systests/etc/config-systests-firewall-2.xml
+++ b/java/systests/etc/config-systests-firewall-2.xml
@@ -23,6 +23,8 @@
<prefix>${QPID_HOME}</prefix>
<work>${QPID_WORK}</work>
<conf>${prefix}/etc</conf>
+ <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
+ <cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<!-- To enable SSL edit the keystorePath and keystorePassword
and set enabled to true.
@@ -87,9 +89,7 @@
<principal-database>passwordfile</principal-database>
</jmx>
- <firewall default-action="allow">
- <rule access="deny" network="127.0.0.1"/>
- </firewall>
+ <firewall default-action="deny"/>
</security>
<virtualhosts>${conf}/virtualhosts-systests-firewall-2.xml</virtualhosts>
diff --git a/java/systests/etc/config-systests-firewall-3.xml b/java/systests/etc/config-systests-firewall-3.xml
index 28584de02f..6c0ee7ee3c 100644
--- a/java/systests/etc/config-systests-firewall-3.xml
+++ b/java/systests/etc/config-systests-firewall-3.xml
@@ -23,6 +23,8 @@
<prefix>${QPID_HOME}</prefix>
<work>${QPID_WORK}</work>
<conf>${prefix}/etc</conf>
+ <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
+ <cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<!-- To enable SSL edit the keystorePath and keystorePassword
and set enabled to true.
diff --git a/java/systests/etc/virtualhosts-systests-firewall-2.xml b/java/systests/etc/virtualhosts-systests-firewall-2.xml
index 7990483348..20908e6eb4 100644
--- a/java/systests/etc/virtualhosts-systests-firewall-2.xml
+++ b/java/systests/etc/virtualhosts-systests-firewall-2.xml
@@ -28,9 +28,6 @@
<store>
<class>org.apache.qpid.server.store.MemoryMessageStore</class>
</store>
- <security>
- <firewall default-action="allow"/>
- </security>
</test>
</virtualhost>
@@ -40,6 +37,11 @@
<store>
<class>org.apache.qpid.server.store.MemoryMessageStore</class>
</store>
+ <security>
+ <firewall default-action="deny">
+ <rule access="allow" network="127.0.0.1"/>
+ </firewall>
+ </security>
</test2>
</virtualhost>
</virtualhosts> \ No newline at end of file
diff --git a/java/systests/etc/virtualhosts-systests-firewall-3.xml b/java/systests/etc/virtualhosts-systests-firewall-3.xml
index 45a2ae5ef4..90377f345f 100644
--- a/java/systests/etc/virtualhosts-systests-firewall-3.xml
+++ b/java/systests/etc/virtualhosts-systests-firewall-3.xml
@@ -38,8 +38,8 @@
<class>org.apache.qpid.server.store.MemoryMessageStore</class>
</store>
<security>
- <firewall default-action="deny"/>
- </security>
+ <firewall default-action="deny"/>
+ </security>
</test2>
</virtualhost>
</virtualhosts>
diff --git a/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java b/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
index fae8ee4a0a..35dd757330 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/security/firewall/FirewallConfigTest.java
@@ -100,26 +100,26 @@ public class FirewallConfigTest extends QpidBrokerTestCase
try
{
//Try to get a connection to the 'test2' vhost
- //This is expected to fail as it is denied at the broker level
- conn = getConnection(new AMQConnectionURL("amqp://username:password@clientid/test2?brokerlist='" + getBroker() + "'"));
- fail("We expected the connection to fail");
+ //This is expected to succeed as it is allowed at the vhost level
+ conn = getConnection(new AMQConnectionURL("amqp://guest:guest@clientid/test2?brokerlist='" + getBroker() + "'"));
}
catch (JMSException e)
{
- //ignore
+ e.getLinkedException().printStackTrace();
+ fail("The connection was expected to succeed: " + e.getMessage());
}
conn = null;
try
{
//Try to get a connection to the 'test' vhost
- //This is expected to succeed as it is allowed at the vhost level
+ //This is expected to fail as it is denied at the broker level
conn = getConnection();
+ fail("We expected the connection to fail");
}
catch (JMSException e)
{
- e.getLinkedException().printStackTrace();
- fail("The connection was expected to succeed: " + e.getMessage());
+ //ignore
}
}
@@ -141,8 +141,8 @@ public class FirewallConfigTest extends QpidBrokerTestCase
{
//Try to get a connection to the 'test2' vhost
//This is expected to fail as it is denied at the vhost level
- conn = getConnection(new AMQConnectionURL(
- "amqp://username:password@clientid/test2?brokerlist='" + getBroker() + "'"));
+ conn = getConnection(new AMQConnectionURL("amqp://guest:guest@clientid/test2?brokerlist='" + getBroker() + "'"));
+ fail("The connection was expected to fail");
}
catch (JMSException e)
{