diff options
author | Hariharan <rh20085046@wipro.com> | 2021-08-18 14:55:48 +0530 |
---|---|---|
committer | Hariharan <rh20085046@wipro.com> | 2021-08-27 12:42:20 +0530 |
commit | 5daea7c91a07bbe5e23d584c83a0ca8ed3776316 (patch) | |
tree | d25ee3ed8060ab809ebcc9b5767fcee04b9aa741 /components/kpi-computation-ms/src/test/java/org | |
parent | 1972718be2da50d09ea3284a7ab1746952be4cbb (diff) |
Migrating the kpi.config from app-config file to separate policy module1.0.1-kpi-computation-ms
Issue-ID: DCAEGEN2-2835
Signed-off-by: Hariharan <rh20085046@wipro.com>
Change-Id: I06d7829031b865e3eaa2b37b81116531a4a677d5
Diffstat (limited to 'components/kpi-computation-ms/src/test/java/org')
-rw-r--r-- | components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java b/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java index 07ef51d2..efe84983 100644 --- a/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java +++ b/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java @@ -30,10 +30,12 @@ import java.util.List; import java.util.Map; import org.junit.Test; +import org.onap.dcaegen2.kpi.computation.FileUtils; public class ConfigurationTest { Configuration configuration = Configuration.getInstance(); + private static final String KPI_CONFIG_FILE = "kpi/kpi_config.json"; @Test public void configurationTest() { @@ -76,4 +78,11 @@ public class ConfigurationTest { assertEquals("kpi config", configuration.getKpiConfig()); assertEquals(10, configuration.getCbsPollingInterval()); } + + @Test + public void updateConfigFromPolicyTest() { + String strKpiConfig = FileUtils.getFileContents(KPI_CONFIG_FILE); + configuration.setKpiConfig(strKpiConfig); + assertEquals(strKpiConfig, configuration.getKpiConfig()); + } } |