From 5daea7c91a07bbe5e23d584c83a0ca8ed3776316 Mon Sep 17 00:00:00 2001 From: Hariharan Date: Wed, 18 Aug 2021 14:55:48 +0530 Subject: Migrating the kpi.config from app-config file to separate policy module Issue-ID: DCAEGEN2-2835 Signed-off-by: Hariharan Change-Id: I06d7829031b865e3eaa2b37b81116531a4a677d5 --- .../java/org/onap/dcaegen2/kpi/models/ConfigurationTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'components/kpi-computation-ms/src/test/java/org') 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()); + } } -- cgit 1.2.3-korg