Revert "KNOX-485 - make the data/deployments directory configurable (Andreina J via lmccay)"
This reverts commit 0b45978ef5e5c1318e4de9e1308cecc894e3f97d.
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
index bd4284e..35739b1 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
@@ -274,7 +274,7 @@
@Override
public String getGatewayDeploymentDir() {
- return get(DEPLOYMENT_DIR, getGatewayDataDir() + File.separator + DEFAULT_DEPLOYMENT_DIR);
+ return getGatewayDataDir() + File.separator + "deployments";
}
@Override
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
index 4534165..279198c 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
@@ -84,22 +84,4 @@
GatewayConfig config = new GatewayConfigImpl();
assertThat( config.getDefaultAppRedirectPath(), is( "/gateway/sandbox" ) );
}
-
- @Test
- public void testForUpdatedDeploymentDir() {
- String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml");
- System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
- System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
- GatewayConfig config = new GatewayConfigImpl();
- assertTrue(("/test").equalsIgnoreCase(config.getGatewayDeploymentDir()));
- }
-
- @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"));
- }
}
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
index 0adf47f..80a4c96 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
@@ -48,9 +48,4 @@
<value>SSLv3</value>
<description>Excluded SSL protocols.</description>
</property>
- <property>
- <name>gateway.deployment.dir</name>
- <value>/test</value>
- <description>The path that contains deployments.</description>
- </property>
</configuration>
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
index 0635bde..518e737 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
@@ -54,10 +54,5 @@
<value>shiro.ini</value>
<description>The location of the Shiro configuration file.</description>
</property>
- <property>
- <name>gateway.deployment.dir</name>
- <value>/test</value>
- <description>The path that contains deployments.</description>
- </property>
</configuration>