summaryrefslogtreecommitdiff
path: root/qpid/java/systests
diff options
context:
space:
mode:
authorAlex Rudyy <orudyy@apache.org>2013-03-11 18:30:31 +0000
committerAlex Rudyy <orudyy@apache.org>2013-03-11 18:30:31 +0000
commit3f138e2ddc02857c61e578aaaf12c82d9eefc93c (patch)
tree3de578ab99d630bc1610a263452c6715a0f0d901 /qpid/java/systests
parent66de8678fb2ab2af8dc5b6d653402b1efd70779b (diff)
downloadqpid-python-3f138e2ddc02857c61e578aaaf12c82d9eefc93c.tar.gz
QPID-4639: Add UI to add/delete virtual hosts into java broker web management console
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1455274 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests')
-rw-r--r--qpid/java/systests/etc/config-systests.json2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java16
2 files changed, 3 insertions, 15 deletions
diff --git a/qpid/java/systests/etc/config-systests.json b/qpid/java/systests/etc/config-systests.json
index a5b85a2050..412bee3f6b 100644
--- a/qpid/java/systests/etc/config-systests.json
+++ b/qpid/java/systests/etc/config-systests.json
@@ -28,7 +28,7 @@
"trustStorePassword": "password",
"authenticationproviders" : [ {
"name" : "plain",
- "authenticationProviderType" : "PlainPasswordFileAuthenticationProvider",
+ "type" : "PlainPasswordFileAuthenticationProvider",
"path" : "${QPID_HOME}/etc/passwd"
} ],
"ports" : [ {
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java
index 89645507c4..40a1c13718 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java
@@ -52,7 +52,7 @@ public class AuthenticationProviderRestTest extends QpidRestTestCase
}
}
- public void testPutCreateNewPlainPrincipalDatabaseProvider() throws Exception
+ public void testPutCreateSecondPlainPrincipalDatabaseProviderFails() throws Exception
{
File principalDatabase = getRestTestHelper().createTemporaryPasswdFile(new String[]{"admin2", "guest2", "test2"});
@@ -63,19 +63,7 @@ public class AuthenticationProviderRestTest extends QpidRestTestCase
attributes.put(PlainPasswordFileAuthenticationManagerFactory.ATTRIBUTE_PATH, principalDatabase.getAbsolutePath());
int responseCode = getRestTestHelper().submitRequest("/rest/authenticationprovider/" + providerName, "PUT", attributes);
- assertEquals("Unexpected response code", 201, responseCode);
-
- List<Map<String, Object>> providerDetails = getRestTestHelper().getJsonAsList("/rest/authenticationprovider/" + providerName);
- assertNotNull("Providers details cannot be null", providerDetails);
- assertEquals("Unexpected number of providers", 1, providerDetails.size());
- Map<String, Object> provider = providerDetails.get(0);
- assertProvider(true, PlainPasswordFileAuthenticationManagerFactory.PROVIDER_TYPE, provider);
-
- // provider should exists after broker restart
- restartBroker();
- providerDetails = getRestTestHelper().getJsonAsList("/rest/authenticationprovider/" + providerName);
- assertNotNull("Providers details cannot be null", providerDetails);
- assertEquals("Unexpected number of providers", 1, providerDetails.size());
+ assertEquals("Expected to fail because we can have only one password provider", 409, responseCode);
}
public void testPutCreateNewAnonymousProvider() throws Exception