summaryrefslogtreecommitdiffstats
path: root/engine-d
diff options
context:
space:
mode:
authortangpeng <tang.peng5@zte.com.cn>2019-02-26 08:20:28 +0000
committertangpeng <tang.peng5@zte.com.cn>2019-02-26 08:20:28 +0000
commit750ae4a611050eb0e33f4f5420aa0297b59790e3 (patch)
tree8aa29af137a0ecd5ce8e0d0fc60b666ead3d00a9 /engine-d
parent88bcc3a2d49014774277bb037b4336910933cbca (diff)
Run the app with a non-root user
Change-Id: Ie851ca9ad1e0278b36d75d6aa06d010b982af48a Issue-ID: HOLMES-202 Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'engine-d')
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/EngineDAppConfig.java13
-rw-r--r--engine-d/src/test/java/org/onap/holmes/engine/EnginedAppConfigTest.java15
2 files changed, 0 insertions, 28 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/EngineDAppConfig.java b/engine-d/src/main/java/org/onap/holmes/engine/EngineDAppConfig.java
index 71a58f9..836912f 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/EngineDAppConfig.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/EngineDAppConfig.java
@@ -21,29 +21,16 @@ import io.dropwizard.db.DataSourceFactory;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.jvnet.hk2.annotations.Service;
-import org.onap.holmes.common.config.MQConfig;
@Service
public class EngineDAppConfig extends Configuration {
private String apidescription = "Holmes rule management rest API";
- @JsonProperty
- @NotNull
- @Valid
- private MQConfig mqConfig;
@Valid
@NotNull
private DataSourceFactory database = new DataSourceFactory();
- public MQConfig getMqConfig() {
- return mqConfig;
- }
-
- public void setMqConfig(MQConfig mqConfig) {
- this.mqConfig = mqConfig;
- }
-
@JsonProperty("database")
public DataSourceFactory getDataSourceFactory() {
return database;
diff --git a/engine-d/src/test/java/org/onap/holmes/engine/EnginedAppConfigTest.java b/engine-d/src/test/java/org/onap/holmes/engine/EnginedAppConfigTest.java
index 9642474..c550b37 100644
--- a/engine-d/src/test/java/org/onap/holmes/engine/EnginedAppConfigTest.java
+++ b/engine-d/src/test/java/org/onap/holmes/engine/EnginedAppConfigTest.java
@@ -22,7 +22,6 @@ import org.hamcrest.core.IsNull;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import org.onap.holmes.common.config.MQConfig;
import org.powermock.api.easymock.PowerMock;
public class EnginedAppConfigTest {
@@ -35,20 +34,6 @@ public class EnginedAppConfigTest {
}
@Test
- public void getMqConfig() {
- MQConfig mqConfig = PowerMock.createMock(MQConfig.class);
- engineAppConfig.setMqConfig(mqConfig);
- Assert.assertThat(engineAppConfig.getMqConfig(), IsNull.notNullValue());
- }
-
- @Test
- public void setMqConfig() {
- MQConfig mqConfig = PowerMock.createMock(MQConfig.class);
- engineAppConfig.setMqConfig(mqConfig);
- Assert.assertThat(engineAppConfig.getMqConfig(), IsEqual.equalTo(mqConfig));
- }
-
- @Test
public void getDataSourceFactory() {
Assert.assertThat(engineAppConfig.getDataSourceFactory(), IsNull.<DataSourceFactory>notNullValue());
}