summaryrefslogtreecommitdiff
path: root/java/systests
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2013-03-31 21:45:08 +0000
committerRobert Gemmell <robbie@apache.org>2013-03-31 21:45:08 +0000
commitd15cb05bdbca4b5a904a644c81b524d426a21799 (patch)
tree2c79b7a908f49f05e84a442106e91d9165a7572a /java/systests
parent6ef5c506d07fc94bd85c17b31a83ef224ffd9349 (diff)
downloadqpid-python-d15cb05bdbca4b5a904a644c81b524d426a21799.tar.gz
QPID-4657, QPID-4683: review changes for new port configuration functionality
- Fix ability to select SSL for a port - Add ability to set SSL Client Auth attributes for a port - Enforce that you have SSL keystores/trustures in place when creating new ports that will fail to work without them - Update names and placeholder text in UI to convey what happens when you dont fill out an optional attribute. - Remove the default AMQP port value in form, makes the user specify port and avoid near definite clash. - Removed requirement to specify Transport since it is actually optional. - Ensure the port state is set accurately for newly added ports - Fix the ability to override the management ports in ManagementMode - Allow editing the management ports in Management Mode without having to override them first. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1463060 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java6
-rw-r--r--java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java5
2 files changed, 9 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java b/java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
index 144e64f0bf..e20db6a6ac 100644
--- a/java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
+++ b/java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
@@ -181,12 +181,16 @@ public class Asserts
public static void assertPortAttributes(Map<String, Object> port)
{
+ assertPortAttributes(port, State.ACTIVE);
+ }
+ public static void assertPortAttributes(Map<String, Object> port, State state)
+ {
assertNotNull("Unexpected value of attribute " + Port.ID, port.get(Port.ID));
assertEquals("Unexpected value of attribute " + Port.DURABLE, Boolean.FALSE, port.get(Port.DURABLE));
assertEquals("Unexpected value of attribute " + Port.LIFETIME_POLICY, LifetimePolicy.PERMANENT.name(),
port.get(Broker.LIFETIME_POLICY));
- assertEquals("Unexpected value of attribute " + Port.STATE, State.ACTIVE.name(), port.get(Port.STATE));
+ assertEquals("Unexpected value of attribute " + Port.STATE, state.name(), port.get(Port.STATE));
assertEquals("Unexpected value of attribute " + Port.TIME_TO_LIVE, 0, port.get(Port.TIME_TO_LIVE));
@SuppressWarnings("unchecked")
diff --git a/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java b/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java
index 9302ac88de..f8a7a9855f 100644
--- a/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/systest/rest/PortRestTest.java
@@ -30,6 +30,7 @@ import java.util.Map;
import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.server.model.State;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
import org.apache.qpid.server.security.auth.manager.AnonymousAuthenticationManagerFactory;
import org.apache.qpid.test.utils.TestBrokerConfiguration;
@@ -107,7 +108,7 @@ public class PortRestTest extends QpidRestTestCase
assertNotNull("Port details cannot be null", portDetails);
assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
Map<String, Object> port = portDetails.get(0);
- Asserts.assertPortAttributes(port);
+ Asserts.assertPortAttributes(port, State.QUIESCED);
// make sure that port is there after broker restart
restartBroker();
@@ -115,6 +116,8 @@ public class PortRestTest extends QpidRestTestCase
portDetails = getRestTestHelper().getJsonAsList("/rest/port/" + portName);
assertNotNull("Port details cannot be null", portDetails);
assertEquals("Unexpected number of ports with name " + portName, 1, portDetails.size());
+ port = portDetails.get(0);
+ Asserts.assertPortAttributes(port, State.ACTIVE);
// try to add a second RMI port
attributes = new HashMap<String, Object>();