diff options
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java')
-rw-r--r-- | common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java index 48aecf4adc..0d9da6455f 100644 --- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java @@ -17,18 +17,14 @@ package org.onap.config.test; import java.io.IOException; -import java.lang.management.ManagementFactory; import java.util.HashMap; import java.util.Map; -import javax.management.JMX; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.onap.config.Constants; import org.onap.config.api.ConfigurationManager; +import org.onap.config.impl.CliConfigurationImpl; import org.onap.config.util.ConfigTestConstant; import org.onap.config.util.TestUtil; @@ -60,22 +56,18 @@ public class CliFallbackAndLookupTest { input.put("namespace", NAMESPACE); input.put("key", ConfigTestConstant.ARTIFACT_MAXSIZE); - MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer(); - ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME); - ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true); + ConfigurationManager conf = new CliConfigurationImpl(); String maxSizeWithNoFallback = conf.getConfigurationValue(input); Assert.assertEquals("", maxSizeWithNoFallback); //Verify underlying resource without lookup switch input.put("key", ConfigTestConstant.ARTIFACT_JSON_SCHEMA); String jsonSchema = conf.getConfigurationValue(input); - System.out.println("jsonSchema==" + jsonSchema); Assert.assertEquals("@" + System.getProperty("user.home") + "/TestResources/GeneratorsList.json", jsonSchema); //Verify underlying resource with lookup switch input.put("externalLookup", true); jsonSchema = conf.getConfigurationValue(input); - System.out.println("jsonSchema==" + jsonSchema); Assert.assertEquals("{name:\"SCM\"}", jsonSchema); //Verify with fallback |