use of org.apache.knox.gateway.config.GatewayConfig in project knox by apache.
the class GatewayGlobalConfigTest method testSiteConfig.
@Test
public void testSiteConfig() {
System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, getHomeDirName("conf-site/conf/gateway-site.xml"));
GatewayConfig config = new GatewayConfigImpl();
assertThat(config.getGatewayPort(), is(5555));
assertThat(config.isClientAuthNeeded(), is(true));
assertThat(config.getTruststorePath(), is("./gateway-trust.jks"));
assertThat(config.getTruststoreType(), is("PKCS12"));
assertThat(config.getKeystoreType(), is("JKS"));
}
use of org.apache.knox.gateway.config.GatewayConfig in project knox by apache.
the class GatewayGlobalConfigTest method testForDataDirSetAsConfiguration.
@Test
public void testForDataDirSetAsConfiguration() {
String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml");
System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
System.clearProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR);
GatewayConfig config = new GatewayConfigImpl();
assertTrue(("target/testDataDir").equalsIgnoreCase(config.getGatewayDataDir()));
}
use of org.apache.knox.gateway.config.GatewayConfig in project knox by apache.
the class GatewayGlobalConfigTest method testDefaultDeploymentDir.
@Test
public void testDefaultDeploymentDir() {
String homeDirName = getHomeDirName("conf-site/conf/gateway-site.xml");
System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
GatewayConfig config = new GatewayConfigImpl();
assertThat(config.getGatewayDeploymentDir(), is(homeDirName + File.separator + "deployments"));
}
use of org.apache.knox.gateway.config.GatewayConfig in project knox by apache.
the class GatewayGlobalConfigTest method testFullConfig.
@Test
public void testFullConfig() {
System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, getHomeDirName("conf-full/conf/gateway-default.xml"));
GatewayConfig config = new GatewayConfigImpl();
assertThat(config.getGatewayPort(), is(7777));
assertThat(config.isClientAuthNeeded(), is(false));
assertNull("ssl.exclude.protocols should be null.", config.getExcludedSSLProtocols());
// assertThat( config.getShiroConfigFile(), is( "full-shiro.ini") );
}
use of org.apache.knox.gateway.config.GatewayConfig in project knox by apache.
the class GatewayGlobalConfigTest method testForDefaultSecurityDataDir.
@Test
public void testForDefaultSecurityDataDir() {
String homeDirName = getHomeDirName("conf-site/conf/gateway-site.xml");
System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
GatewayConfig config = new GatewayConfigImpl();
assertThat(config.getGatewaySecurityDir(), is(homeDirName + File.separator + "security"));
}
Aggregations