Checkpoint commit for OPENDJ-1235 : Migrate configuration framework
* Fix error in AggregationClientTest
** Test testModifyChildManagedObject was failing due to broken configuration
when run with other test cases (dependency on order of tests)
** Replace LDAPS config entry by HTTP config entry to have a fully defined config
with less things to initialize
* Minor cleanup in other tests
| | |
| | | "ds-cfg-enabled: true", |
| | | "ds-cfg-listen-address: 0.0.0.0", "ds-cfg-listen-port: 389", |
| | | "", |
| | | "dn: cn=LDAPS Connection Handler,cn=Connection Handlers,cn=config", |
| | | "dn: cn=HTTP Connection Handler,cn=Connection Handlers,cn=config", |
| | | "objectClass: top", |
| | | "objectClass: ds-cfg-connection-handler", |
| | | "objectClass: ds-cfg-ldap-connection-handler", |
| | | "cn: LDAPS Connection Handler", |
| | | "ds-cfg-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler", |
| | | "objectClass: ds-cfg-http-connection-handler", |
| | | "cn: HTTP Connection Handler", |
| | | "ds-cfg-java-class: org.opends.server.protocols.http.HTTPConnectionHandler", |
| | | "ds-cfg-enabled: false", |
| | | "ds-cfg-listen-address: 0.0.0.0", |
| | | "ds-cfg-listen-port: 636", |
| | | "ds-cfg-use-ssl: true", |
| | | "ds-cfg-ssl-client-auth-policy: optional", |
| | | "ds-cfg-ssl-cert-nickname: server-cert", |
| | | "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config", |
| | | "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config", |
| | | "ds-cfg-listen-port: 8080", |
| | | "", |
| | | "dn: cn=JMX Connection Handler,cn=Connection Handlers,cn=config", |
| | | "objectClass: top", |
| | |
| | | "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config"); |
| | | c.importLDIF(TEST_LDIF); |
| | | c.addExpectedModification("ds-cfg-rotation-policy", |
| | | "cn=LDAPS Connection Handler,cn=connection handlers, cn=config", |
| | | "cn=JMX Connection Handler,cn=connection handlers, cn=config"); |
| | | "cn=HTTP Connection Handler,cn=connection handlers, cn=config", |
| | | "cn=JMX Connection Handler,cn=connection handlers, cn=config"); |
| | | ManagementContext ctx = LDAPManagementContext.createFromContext(c); |
| | | TestParentCfgClient parent = getTestParent(ctx, "test parent 1"); |
| | | TestChildCfgClient child = parent.getTestChild("test child 2"); |
| | | child.setAggregationProperty(Arrays.asList("LDAPS Connection Handler", "JMX Connection Handler")); |
| | | child.setAggregationProperty(Arrays.asList("JMX Connection Handler", "HTTP Connection Handler")); |
| | | child.commit(); |
| | | Assert.assertTrue(c.isEntryModified()); |
| | | } |
| | |
| | | TestCfg.cleanup(); |
| | | |
| | | // Restore the test child aggregation definition. |
| | | //TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault); |
| | | TestCfg.addPropertyDefinition(aggregationPropertyDefinitionDefault); |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.forgerock.opendj.ldap.Entry; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.schema.Schema; |
| | | import org.forgerock.opendj.ldif.LDIF; |
| | | import org.mockito.ArgumentCaptor; |
| | | import org.opends.server.admin.AdminTestCase; |
| | | import org.opends.server.admin.TestCfg; |
| | |
| | | "ds-cfg-attribute-type: description", |
| | | "ds-cfg-conflict-behavior: virtual-overrides-real"); |
| | | |
| | | static final Entry TEST_PARENT_1 = LDIF.makeEntry(LDIF_TEST_PARENT_1); |
| | | static final Entry TEST_PARENT_1 = makeEntry(LDIF_TEST_PARENT_1); |
| | | |
| | | // Parent 2 - overrides default values for optional-multi-valued-dn-property. |
| | | static final Entry TEST_PARENT_2 = LDIF.makeEntry( |
| | | static final Entry TEST_PARENT_2 = makeEntry( |
| | | "dn: cn=test parent 2,cn=test parents,cn=config", |
| | | "objectclass: top", |
| | | "objectclass: ds-cfg-test-parent-dummy", |