Issue #6021 - Fixing test case
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
613e0ecd54
commit
927dc60983
|
@ -1622,15 +1622,23 @@ public class XmlConfigurationTest
|
||||||
" </Set>" +
|
" </Set>" +
|
||||||
"</Configure>");
|
"</Configure>");
|
||||||
|
|
||||||
configuration.setJettyStandardIdsAndProperties(null, Resource.newResource(war));
|
try
|
||||||
configuration.getProperties().put("jetty.base", "/var/lib/jetty-base");
|
{
|
||||||
if (configValue != null)
|
configuration.setJettyStandardIdsAndProperties(null, Resource.newResource(war));
|
||||||
configuration.getProperties().put("jetty.sslContext.keyStorePath", configValue);
|
configuration.getProperties().put("jetty.base", "/var/lib/jetty-base");
|
||||||
|
if (configValue != null)
|
||||||
|
configuration.getProperties().put("jetty.sslContext.keyStorePath", configValue);
|
||||||
|
|
||||||
TestConfiguration tc = new TestConfiguration();
|
TestConfiguration tc = new TestConfiguration();
|
||||||
configuration.configure(tc);
|
configuration.configure(tc);
|
||||||
|
|
||||||
assertThat(tc.getTestString(), is(expectedPath));
|
assertThat(tc.getTestString(), is(expectedPath));
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// cleanup after myself
|
||||||
|
configuration.getProperties().remove("jetty.base");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1658,7 +1666,7 @@ public class XmlConfigurationTest
|
||||||
FS.ensureDeleted(testPath);
|
FS.ensureDeleted(testPath);
|
||||||
Path baseDir = testPath.resolve("bogus");
|
Path baseDir = testPath.resolve("bogus");
|
||||||
String resolved = XmlConfiguration.resolvePath(baseDir.toString(), "etc/keystore");
|
String resolved = XmlConfiguration.resolvePath(baseDir.toString(), "etc/keystore");
|
||||||
assertNull(resolved, "Should be null as baseDir does not exist");
|
assertEquals(baseDir.resolve("etc/keystore").toString(), resolved);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ByteArrayOutputStream captureLoggingBytes(ThrowableAction action) throws Exception
|
private ByteArrayOutputStream captureLoggingBytes(ThrowableAction action) throws Exception
|
||||||
|
|
Loading…
Reference in New Issue