summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/application/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/application/src/test')
-rw-r--r--ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java62
-rw-r--r--ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java49
-rwxr-xr-xms/controllerblueprints/application/src/test/resources/application.properties58
-rw-r--r--ms/controllerblueprints/application/src/test/resources/logback-test.xml35
4 files changed, 0 insertions, 204 deletions
diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java
deleted file mode 100644
index 0b9df88b8..000000000
--- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-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.boot.test.web.client.TestRestTemplate;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.client.support.BasicAuthorizationInterceptor;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
-public class ControllerBlueprintsApplicationTest {
- @Autowired
- private TestRestTemplate restTemplate;
-
- @Before
- public void setUp(){
- BasicAuthorizationInterceptor bai = new BasicAuthorizationInterceptor("ccsdkapps", "ccsdkapps");
- this.restTemplate.getRestTemplate().getInterceptors().add(bai);
- }
-
- @Test
- public void testConfigModel() {
- HttpHeaders headers = new HttpHeaders();
- headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
-// ResponseEntity<BlueprintModel> entity = this.restTemplate
-// .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class);
-// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
-// Assert.assertNotNull("failed to get response Config model",entity.getBody());
- }
-
- @Test
- public void testConfigModelFailure() {
- HttpHeaders headers = new HttpHeaders();
- headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
-// ResponseEntity<BlueprintModel> entity = this.restTemplate
-// .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class);
-// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
-// Assert.assertNotNull("failed to get response Config model",entity.getBody());
- }
-}
diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java
deleted file mode 100644
index 9688b26b1..000000000
--- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints;
-
-import org.apache.commons.lang3.StringUtils;
-import org.junit.Assert;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-
-/**
- * VersionSplitTest
- *
- * @author Brinda Santh
- */
-public class VersionSplitTest {
- private static Logger log = LoggerFactory.getLogger(VersionSplitTest.class);
-
- @Test
- public void testVersionSplit() {
- String version = "1.03.04";
- String[] tokens = StringUtils.split(version, '.');
- Assert.assertNotNull("failed to tokenize", tokens);
- Assert.assertEquals("failed to three token ", 3, tokens.length);
- }
-
- @Test
- public void encodeTest() {
- String name = "ccsdkapps";
- BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
- String encodedValue = bCryptPasswordEncoder.encode(name);
- Assert.assertTrue("Failed to match", bCryptPasswordEncoder.matches(name, encodedValue));
- }
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/application/src/test/resources/application.properties b/ms/controllerblueprints/application/src/test/resources/application.properties
deleted file mode 100755
index a3445d904..000000000
--- a/ms/controllerblueprints/application/src/test/resources/application.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright © 2017-2018 AT&T Intellectual Property.
-# Modifications Copyright © 2018 IBM.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-spring.main.banner-mode=off
-
-appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.cds.controllerblueprints
-appVersion=1.0.0
-
-# Basic Authentication
-basic-auth.user-name=ccsdkapps
-basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y
-
-#To Remove Null in JSON API Response
-spring.jackson.default-property-inclusion=non_null
-
-#Swagger Configuration
-swagger.contact.name=Brinda Santh Muthuramalingam
-swagger.contact.url=www.onap.com
-swagger.contact.email=brindasanth@onap.com
-
-# Load Resource Source Mappings
-resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability
-
-# Controller Blueprints Core Configuration
-blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive
-blueprintsprocessor.blueprintEnrichmentPath=./target/blueprints/enrichment
-# Controller Blueprint Load Configurations
-blueprintsprocessor.loadInitialData=false
-blueprintsprocessor.loadBluePrint=false
-blueprintsprocessor.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint
-blueprintsprocessor.loadModelType=false
-blueprintsprocessor.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type
-blueprintsprocessor.loadResourceDictionary=false
-blueprintsprocessor.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary
-
-# CBA file extension
-blueprintsprocessor.loadCbaExtension=zip
-
-# CBA examples for tests cases
-blueprintsprocessor.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint
-
-# Web server config
-server.port=8080
diff --git a/ms/controllerblueprints/application/src/test/resources/logback-test.xml b/ms/controllerblueprints/application/src/test/resources/logback-test.xml
deleted file mode 100644
index 2252939e7..000000000
--- a/ms/controllerblueprints/application/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>