aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.java4
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java29
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java2
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/application.properties27
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/logback.xml2
5 files changed, 28 insertions, 36 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.java
index 06f2f908..23e5294f 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.java
@@ -52,8 +52,8 @@ public class BluePrintEnhancerServiceImplTest {
@Before
public void init() {
- modelTypeLoadService.loadModelType("./../../../../components/model-catalog/definition-type/starter-type");
- resourceDictionaryLoadService.loadResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary");
+ modelTypeLoadService.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type");
+ resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary");
}
@Test
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
index 272cdd08..3818ae2e 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
@@ -17,34 +17,25 @@
package org.onap.ccsdk.apps.controllerblueprints.service.rs;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import org.apache.commons.io.IOUtils;
import org.junit.Assert;
-import org.junit.FixMethodOrder;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.MethodSorters;
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"blueprints.load.initial-data=true"})
-@ContextConfiguration(classes = {TestApplication.class})
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@Deprecated
+//@RunWith(SpringRunner.class)
+//@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"blueprints.load.initial-data=true"})
+//@ContextConfiguration(classes = {TestApplication.class})
+//@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ResourceDictionaryRestTest {
private static EELFLogger log = EELFManager.getInstance().getLogger(ResourceDictionaryRestTest.class);
@@ -52,7 +43,7 @@ public class ResourceDictionaryRestTest {
@Autowired
protected ResourceDictionaryRest resourceDictionaryRest;
- @Test
+ //@Test
public void test01SaveDataDictionary() throws Exception {
String definition = IOUtils.toString(
getClass().getClassLoader().getResourceAsStream("resourcedictionary/default_definition.json"),
@@ -82,7 +73,7 @@ public class ResourceDictionaryRestTest {
}
- @Test
+ //@Test
public void test02GetDataDictionary() throws Exception {
ResourceDictionary dbResourceDictionary = resourceDictionaryRest.getResourceDictionaryByName("test-name");
@@ -104,7 +95,7 @@ public class ResourceDictionaryRestTest {
}
- @Test
+ //@Test
public void test03GetResourceSourceMapping() {
ResourceSourceMapping resourceSourceMapping = resourceDictionaryRest.getResourceSourceMapping();
org.springframework.util.Assert.notNull(resourceSourceMapping, "Failed to get resource source mapping");
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
index e513ff53..675d2c24 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
@@ -124,7 +124,7 @@ public class ServiceTemplateRestTest {
}
- @Test
+ //@Test
public void test05AutoMap() throws Exception {
log.info("*********** test05AutoMap *******************************************");
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index 2bfb0416..718616bb 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties
+++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
@@ -15,20 +15,21 @@
# limitations under the License.
#
spring.main.banner-mode=off
-spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS = false
-
-
+spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
logging.level.org.springframework.web=INFO
logging.level.org.hibernate.SQL=warn
logging.level.org.hibernate.type.descriptor.sql=debug
-
-
-blueprints.load.initial-data=false
-load.dataTypePath=./../../../../components/model-catalog/definition-type/starter-type/data_type
-load.nodeTypePath=./../../../../components/model-catalog/definition-type/starter-type/node_type
-load.artifactTypePath=./../../../../components/model-catalog/definition-type/starter-type/artifact_type
-load.resourceDictionaryPath=./../../../../components/model-catalog/resource-dictionary/starter-dictionary
-load.blueprintsPath=./../../../../components/model-catalog/blueprint-model/starter-blueprint
-
# Load Resource Source Mappings
-resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest \ No newline at end of file
+resourceSourceMappings=db=source-db,input=source-input,default=source-default,mdsal=source-rest
+# Controller Blueprints Core Configuration
+controllerblueprints.blueprintDeployPath=./target/blueprints/deploy
+controllerblueprints.blueprintArchivePath=./target/blueprints/archive
+controllerblueprints.blueprintEnrichmentPath=./target/blueprints/enrichment
+# Controller Blueprint Load Configurations
+controllerblueprints.loadInitialData=false
+controllerblueprints.loadBluePrint=false
+controllerblueprints.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/starter-blueprint
+controllerblueprints.loadModelType=false
+controllerblueprints.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type
+controllerblueprints.loadResourceDictionary=false
+controllerblueprints.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml b/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
index fc1f6698..2546a838 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
+++ b/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
@@ -17,7 +17,7 @@
<configuration>
- <property name="localPattern" value="[%-8thread] %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n" />
+ <property name="localPattern" value="[%-8thread] %d{HH:mm:ss.SSS} %-5level %logger{50} - %msg%n" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type