Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit c4be553

Browse files
committed
#230 Added mlRestServerName and mlTestRestServerName
1 parent 2a2e548 commit c4be553

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/main/java/com/marklogic/appdeployer/DefaultAppConfigFactory.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,18 @@ public AppConfig newAppConfig() {
252252
c.setAppServicesSimpleSslConfig();
253253
}
254254

255+
prop = getProperty("mlRestServerName");
256+
if (prop != null) {
257+
logger.info("REST server name: " + prop);
258+
c.setRestServerName(prop);
259+
}
260+
261+
prop = getProperty("mlTestRestServerName");
262+
if (prop != null) {
263+
logger.info("Test REST server name: " + prop);
264+
c.setTestRestServerName(prop);
265+
}
266+
255267
/**
256268
* When a content database is created, this property can be used to control the number of forests per host for
257269
* that database.

src/test/java/com/marklogic/appdeployer/DefaultAppConfigFactoryTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void moduleTimestampsPath() {
4040
AppConfig config = new DefaultAppConfigFactory(new SimplePropertySource(p)).newAppConfig();
4141
assertNull(config.getModuleTimestampsPath());
4242
}
43-
43+
4444
@Test
4545
public void unrecognizedProperties() {
4646
sut = new DefaultAppConfigFactory(new SimplePropertySource("foo.mlHost", "host", "foo.mlUsername", "user"));
@@ -103,7 +103,7 @@ public void allProperties() {
103103
p.setProperty("mlRestCertPassword", "restCertPassword");
104104
p.setProperty("mlRestExternalName", "restExternalName");
105105

106-
p.setProperty("mlAppServicesUsername", "appServicesUsername");
106+
p.setProperty("mlAppServicesUsername", "appServicesUsername");
107107
p.setProperty("mlAppServicesPassword", "appServicesPassword");
108108
p.setProperty("mlAppServicesPort", "8123");
109109
p.setProperty("mlAppServicesAuthentication", "kerBEROS");
@@ -112,6 +112,9 @@ public void allProperties() {
112112
p.setProperty("mlAppServicesExternalName", "appServicesExternalName");
113113
p.setProperty("mlAppServicesSimpleSsl", "true");
114114

115+
p.setProperty("mlRestServerName", "my-rest-server");
116+
p.setProperty("mlTestRestServerName", "my-test-rest-server");
117+
115118
p.setProperty("mlContentForestsPerHost", "17");
116119
p.setProperty("mlCreateForests", "false");
117120
p.setProperty("mlForestsPerHost", "some-db,2,other-db,3");
@@ -204,6 +207,9 @@ public void allProperties() {
204207
assertNotNull(config.getAppServicesSslContext());
205208
assertEquals(DatabaseClientFactory.SSLHostnameVerifier.ANY, config.getAppServicesSslHostnameVerifier());
206209

210+
assertEquals("my-rest-server", config.getRestServerName());
211+
assertEquals("my-test-rest-server", config.getTestRestServerName());
212+
207213
assertEquals((Integer) 17, config.getContentForestsPerHost());
208214
assertFalse(config.isCreateForests());
209215
Map<String, Integer> forestCounts = config.getForestCounts();

0 commit comments

Comments
 (0)