diff options
Diffstat (limited to 'java/systests')
| -rw-r--r-- | java/systests/etc/config-systests.json | 2 | ||||
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java | 16 |
2 files changed, 3 insertions, 15 deletions
diff --git a/java/systests/etc/config-systests.json b/java/systests/etc/config-systests.json index a5b85a2050..412bee3f6b 100644 --- a/java/systests/etc/config-systests.json +++ b/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/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java b/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java index 89645507c4..40a1c13718 100644 --- a/java/systests/src/main/java/org/apache/qpid/systest/rest/AuthenticationProviderRestTest.java +++ b/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 |
