summaryrefslogtreecommitdiffstats
path: root/nokiav2
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-04-11 01:21:30 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-11 01:21:30 +0000
commitafbd99d5f4fd17d6c583ce139ec62122915d6a0b (patch)
treea8b26506564d915b84fb15488b01958c0a6c36cc /nokiav2
parent57993b16f2db6a5f5ecd7d0fb7065d4823c9854a (diff)
parent20297ddd0487602208bd98d89b8acbf940952e7b (diff)
Merge "Fix automatic package conversion"
Diffstat (limited to 'nokiav2')
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/NokiaSvnfmApplication.java15
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/OnapVnfPackageBuilder.java6
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java2
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/SystemFunctions.java2
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/JobManager.java2
-rw-r--r--nokiav2/driver/src/main/resources/MainServiceTemplate.mf (renamed from nokiav2/driver/src/main/resources/MainServiceTemplate.meta)0
-rw-r--r--nokiav2/driver/src/main/resources/TOSCA.meta2
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java32
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/TestOnapVnfPackageBuilder.java9
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/TestConverterApi.java12
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/TestSystemFunctions.java4
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProvider.java3
-rw-r--r--nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestDriverProperties.java12
13 files changed, 41 insertions, 60 deletions
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/NokiaSvnfmApplication.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/NokiaSvnfmApplication.java
index ceb0335d..23c2e4bf 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/NokiaSvnfmApplication.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/NokiaSvnfmApplication.java
@@ -18,14 +18,10 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core.SelfRegistrationManager;
-import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.SystemFunctions;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.JobManager;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
@@ -71,7 +67,7 @@ public class NokiaSvnfmApplication {
private ExecutorService executorService = newCachedThreadPool();
@Autowired
- SelfRegistrationTrigger(SelfRegistrationManager selfRegistrationManager, JobManager jobManager){
+ SelfRegistrationTrigger(SelfRegistrationManager selfRegistrationManager, JobManager jobManager) {
this.jobManager = jobManager;
this.selfRegistrationManager = selfRegistrationManager;
}
@@ -90,13 +86,12 @@ public class NokiaSvnfmApplication {
return true;
};
executorService.submit(() -> {
- while(!jobManager.isPreparingForShutDown()){
- try{
+ while (!jobManager.isPreparingForShutDown()) {
+ try {
executorService.submit(singleRegistration).get();
//registration successful
return;
- }
- catch (Exception e){
+ } catch (Exception e) {
logger.warn("Unable to execute self registration process", e);
}
systemFunctions().sleep(5000);
@@ -117,7 +112,7 @@ public class NokiaSvnfmApplication {
private final JobManager jobManager;
@Autowired
- SelfDeRegistrationTrigger(SelfRegistrationManager selfRegistrationManager, JobManager jobManager){
+ SelfDeRegistrationTrigger(SelfRegistrationManager selfRegistrationManager, JobManager jobManager) {
this.jobManager = jobManager;
this.selfRegistrationManager = selfRegistrationManager;
}
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/OnapVnfPackageBuilder.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/OnapVnfPackageBuilder.java
index 00977e4a..2a058777 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/OnapVnfPackageBuilder.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/OnapVnfPackageBuilder.java
@@ -71,11 +71,9 @@ public class OnapVnfPackageBuilder {
out.putNextEntry(new ZipEntry("MainServiceTemplate.yaml"));
out.write(onapVnfd.getBytes());
out.closeEntry();
- out.putNextEntry(new ZipEntry("Definitions/MainServiceTemplate.yaml"));
- out.write(onapVnfd.getBytes());
out.closeEntry();
- out.putNextEntry(new ZipEntry("MainServiceTemplate.meta"));
- out.write(systemFunctions().loadFile("MainServiceTemplate.meta"));
+ out.putNextEntry(new ZipEntry("MainServiceTemplate.mf"));
+ out.write(systemFunctions().loadFile("MainServiceTemplate.mf"));
out.closeEntry();
out.close();
return result.toByteArray();
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
index 7ae05f5e..da07ef25 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
@@ -59,7 +59,7 @@ public class ConverterApi {
logger.info("REST: convert package");
byte[] content;
try {
- Part part = request.getParts().iterator().next();
+ Part part = request.getPart("fileToUpload");
content = ByteStreams.toByteArray(part.getInputStream());
} catch (Exception e) {
throw buildFatalFailure(logger, "Unable to extract package from REST parameters", e);
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/SystemFunctions.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/SystemFunctions.java
index 87a4d56d..468761c3 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/SystemFunctions.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/SystemFunctions.java
@@ -166,7 +166,7 @@ public class SystemFunctions {
* @param clazz the main source of the Spring application
* @return a new Spring application
*/
- public SpringApplication newSpringApplication(Class clazz){
+ public SpringApplication newSpringApplication(Class clazz) {
return new SpringApplication(clazz);
}
} \ No newline at end of file
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/JobManager.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/JobManager.java
index e97f634d..5624327b 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/JobManager.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/JobManager.java
@@ -100,7 +100,7 @@ public class JobManager {
/**
* @return is the component preparing for shutdown
*/
- public boolean isPreparingForShutDown(){
+ public boolean isPreparingForShutDown() {
return preparingForShutDown;
}
diff --git a/nokiav2/driver/src/main/resources/MainServiceTemplate.meta b/nokiav2/driver/src/main/resources/MainServiceTemplate.mf
index 01f85b17..01f85b17 100644
--- a/nokiav2/driver/src/main/resources/MainServiceTemplate.meta
+++ b/nokiav2/driver/src/main/resources/MainServiceTemplate.mf
diff --git a/nokiav2/driver/src/main/resources/TOSCA.meta b/nokiav2/driver/src/main/resources/TOSCA.meta
index 5cb64478..bba95d16 100644
--- a/nokiav2/driver/src/main/resources/TOSCA.meta
+++ b/nokiav2/driver/src/main/resources/TOSCA.meta
@@ -1,4 +1,4 @@
TOSCA-Meta-Version: 1.0
CSAR-Version: 1.0
Created-By: Kuku
-Entry-Definitions: Definitions/MainServiceTemplate.yaml
+Entry-Definitions: MainServiceTemplate.yaml
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
index c6586c28..b4eed27c 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/TestNokiaSvnfmApplication.java
@@ -17,27 +17,21 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia;
import java.util.HashSet;
import java.util.Set;
-import junit.framework.TestCase;
import org.junit.Before;
import org.junit.Test;
-import org.mockito.*;
+import org.mockito.InOrder;
+import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.onap.core.SelfRegistrationManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.SystemFunctions;
-import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.TestUtil;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.JobManager;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
-import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.Useless;
-import org.slf4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.ContextClosedEvent;
-import org.springframework.test.util.ReflectionTestUtils;
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertTrue;
-import static junit.framework.TestCase.fail;
+import static junit.framework.TestCase.*;
import static org.mockito.Mockito.*;
import static org.springframework.test.util.ReflectionTestUtils.setField;
@@ -80,15 +74,13 @@ public class TestNokiaSvnfmApplication extends TestBase {
selfRegistrationTriggerer.onApplicationEvent(event);
//verify
boolean success = false;
- while(!success)
- {
+ while (!success) {
try {
verify(selfRegistrationManager).register();
verify(logger).info("Self registration started");
verify(logger).info("Self registration finished");
success = true;
- }
- catch (Error e){
+ } catch (Error e) {
}
Thread.sleep(10);
@@ -141,7 +133,7 @@ public class TestNokiaSvnfmApplication extends TestBase {
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
- if(expectedException.size() == 0){
+ if (expectedException.size() == 0) {
RuntimeException e = new RuntimeException();
expectedException.add(e);
throw e;
@@ -155,14 +147,14 @@ public class TestNokiaSvnfmApplication extends TestBase {
//verify
//wait for the registration to succeed
boolean success = false;
- while(!success){
- try{
+ while (!success) {
+ try {
verify(logger).info("Self registration finished");
success = true;
Thread.sleep(10);
+ } catch (Exception e2) {
+ } catch (Error e) {
}
- catch (Exception e2){}
- catch (Error e){}
}
verify(logger, times(2)).info("Self registration started");
verify(logger).error("Self registration failed", expectedException.iterator().next());
@@ -203,7 +195,7 @@ public class TestNokiaSvnfmApplication extends TestBase {
*/
@Test
public void useless() throws Exception {
- String[] args = new String [0];
+ String[] args = new String[0];
SpringApplication springApplicaiton = Mockito.mock(SpringApplication.class);
SystemFunctions systemFunctions = SystemFunctions.systemFunctions();
when(this.systemFunctions.newSpringApplication(NokiaSvnfmApplication.class)).thenReturn(springApplicaiton);
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/TestOnapVnfPackageBuilder.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/TestOnapVnfPackageBuilder.java
index 8ba697d0..1abb432f 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/TestOnapVnfPackageBuilder.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/packagetransformer/TestOnapVnfPackageBuilder.java
@@ -18,6 +18,7 @@ package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.packagetransformer;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
+import java.util.Base64;
import org.junit.Test;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.TestUtil;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.TestBase;
@@ -42,8 +43,7 @@ public class TestOnapVnfPackageBuilder extends TestBase {
when(systemFunctions.loadFile("cbam.collectConnectionPoints.js")).thenCallRealMethod();
when(systemFunctions.loadFile("cbam.post.collectConnectionPoints.js")).thenCallRealMethod();
when(systemFunctions.loadFile("TOSCA.meta")).thenCallRealMethod();
- when(systemFunctions.loadFile("MainServiceTemplate.meta")).thenCallRealMethod();
-
+ when(systemFunctions.loadFile("MainServiceTemplate.mf")).thenCallRealMethod();
String cbamVnfd = new String(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip.vnfd"));
String expectedOnapVnfd = new OnapVnfdBuilder().toOnapVnfd(cbamVnfd);
@@ -52,9 +52,8 @@ public class TestOnapVnfPackageBuilder extends TestBase {
OnapVnfPackageBuilder.main(null);
//verify
assertFileInZip(bos.toByteArray(), "TOSCA-Metadata/TOSCA.meta", TestUtil.loadFile("TOSCA.meta"));
- assertFileInZip(bos.toByteArray(), "Definitions/MainServiceTemplate.yaml", expectedOnapVnfd.getBytes());
assertFileInZip(bos.toByteArray(), "MainServiceTemplate.yaml", expectedOnapVnfd.getBytes());
- assertFileInZip(bos.toByteArray(), "MainServiceTemplate.meta", TestUtil.loadFile("MainServiceTemplate.meta"));
+ assertFileInZip(bos.toByteArray(), "MainServiceTemplate.mf", TestUtil.loadFile("MainServiceTemplate.mf"));
ByteArrayOutputStream actualModifiedCbamVnfPackage = getFileInZip(new ByteArrayInputStream(bos.toByteArray()), "Artifacts/Deployment/OTHER/cbam.package.zip");
byte[] expectedModifiedCbamPackage = new CbamVnfPackageBuilder().toModifiedCbamVnfPackage(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip"), "vnfdloc/a.yaml", new CbamVnfdBuilder().build(cbamVnfd));
assertItenticalZips(expectedModifiedCbamPackage, actualModifiedCbamVnfPackage.toByteArray());
@@ -66,7 +65,7 @@ public class TestOnapVnfPackageBuilder extends TestBase {
*/
@Test
public void testPreventMove() {
- assertEquals("org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.packagetransformer.OnapVnfPackageBuilder", OnapVnfPackageBuilder.class.getCanonicalName());
+ assertEquals("b3JnLm9uYXAudmZjLm5mdm8uZHJpdmVyLnZuZm0uc3ZuZm0ubm9raWEucGFja2FnZXRyYW5zZm9ybWVyLk9uYXBWbmZQYWNrYWdlQnVpbGRlcg==", Base64.getEncoder().encodeToString(OnapVnfPackageBuilder.class.getCanonicalName().getBytes()));
}
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/TestConverterApi.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/TestConverterApi.java
index 8f8cc8c1..d8db6226 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/TestConverterApi.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/TestConverterApi.java
@@ -16,7 +16,6 @@
package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.restapi;
-import com.google.common.collect.Lists;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -72,11 +71,11 @@ public class TestConverterApi extends TestBase {
when(systemFunctions.loadFile("cbam.collectConnectionPoints.js")).thenCallRealMethod();
when(systemFunctions.loadFile("cbam.post.collectConnectionPoints.js")).thenCallRealMethod();
when(systemFunctions.loadFile("TOSCA.meta")).thenCallRealMethod();
- when(systemFunctions.loadFile("MainServiceTemplate.meta")).thenCallRealMethod();
+ when(systemFunctions.loadFile("MainServiceTemplate.mf")).thenCallRealMethod();
when(httpResponse.getOutputStream()).thenReturn(new DelegatingServletOutputStream(actualOut));
Part part = Mockito.mock(Part.class);
when(part.getInputStream()).thenReturn(new ByteArrayInputStream(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip")));
- when(httpRequest.getParts()).thenReturn(Lists.newArrayList(part));
+ when(httpRequest.getPart("fileToUpload")).thenReturn(part);
//when
converterApi.convert(httpResponse, httpRequest);
//verify
@@ -91,9 +90,8 @@ public class TestConverterApi extends TestBase {
String cbamVnfd = new String(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip.vnfd"));
String expectedOnapVnfd = new OnapVnfdBuilder().toOnapVnfd(cbamVnfd);
assertFileInZip(bos.toByteArray(), "TOSCA-Metadata/TOSCA.meta", TestUtil.loadFile("TOSCA.meta"));
- assertFileInZip(bos.toByteArray(), "Definitions/MainServiceTemplate.yaml", expectedOnapVnfd.getBytes());
assertFileInZip(bos.toByteArray(), "MainServiceTemplate.yaml", expectedOnapVnfd.getBytes());
- assertFileInZip(bos.toByteArray(), "MainServiceTemplate.meta", TestUtil.loadFile("MainServiceTemplate.meta"));
+ assertFileInZip(bos.toByteArray(), "MainServiceTemplate.mf", TestUtil.loadFile("MainServiceTemplate.mf"));
ByteArrayOutputStream actualModifiedCbamVnfPackage = getFileInZip(new ByteArrayInputStream(bos.toByteArray()), "Artifacts/Deployment/OTHER/cbam.package.zip");
byte[] expectedModifiedCbamPackage = new CbamVnfPackageBuilder().toModifiedCbamVnfPackage(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip"), "vnfdloc/a.yaml", new CbamVnfdBuilder().build(cbamVnfd));
assertItenticalZips(expectedModifiedCbamPackage, actualModifiedCbamVnfPackage.toByteArray());
@@ -121,7 +119,7 @@ public class TestConverterApi extends TestBase {
@Test
public void testUnableToExtractPackageToBeConverted() throws Exception {
IOException expectedException = new IOException();
- when(httpRequest.getParts()).thenThrow(expectedException);
+ when(httpRequest.getPart("fileToUpload")).thenThrow(expectedException);
try {
converterApi.convert(httpResponse, httpRequest);
fail();
@@ -139,7 +137,7 @@ public class TestConverterApi extends TestBase {
public void testUnableToConvertPackage() throws Exception {
Part part = Mockito.mock(Part.class);
when(part.getInputStream()).thenReturn(new ByteArrayInputStream(TestUtil.loadFile("unittests/packageconverter/cbam.package.zip")));
- when(httpRequest.getParts()).thenReturn(Lists.newArrayList(part));
+ when(httpRequest.getPart("fileToUpload")).thenReturn(part);
try {
converterApi.convert(httpResponse, httpRequest);
fail();
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/TestSystemFunctions.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/TestSystemFunctions.java
index c627bfcf..29dc616f 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/TestSystemFunctions.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/util/TestSystemFunctions.java
@@ -120,9 +120,9 @@ public class TestSystemFunctions {
/**
* Test spring application wrapping
- */
+ */
@Test
- public void testSpring(){
+ public void testSpring() {
SpringApplication springApplication = SystemFunctions.systemFunctions().newSpringApplication(NokiaSvnfmApplication.class);
assertEquals(1, springApplication.getAllSources().size());
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProvider.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProvider.java
index 7817edfd..74c40a2a 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProvider.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestCbamRestApiProvider.java
@@ -42,7 +42,6 @@ import org.springframework.core.env.Environment;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static org.mockito.Mockito.*;
-import static org.springframework.test.util.ReflectionTestUtils.setField;
class ResultCaptor<T> implements Answer {
private T result = null;
@@ -72,7 +71,7 @@ public class TestCbamRestApiProvider extends TestBase {
private java.util.List<NodeInfo> nodes = new ArrayList<>();
private CbamRestApiProvider cbamRestApiProvider;
- private CbamSecurityProvider cbamSecurityProvider ;
+ private CbamSecurityProvider cbamSecurityProvider;
@Before
public void init() {
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestDriverProperties.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestDriverProperties.java
index 6a98e9e0..1db7d975 100644
--- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestDriverProperties.java
+++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/TestDriverProperties.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertEquals;
import static pl.pojo.tester.api.assertion.Assertions.assertPojoMethodsFor;
-public class TestDriverProperties extends TestBase{
+public class TestDriverProperties extends TestBase {
/**
* Test basic POJO behaviour
@@ -34,13 +34,13 @@ public class TestDriverProperties extends TestBase{
/**
* Test parameter initialization by Spring
- * - changes in this constants should be also altered in
- * - application*.properties
- * - in deployment configuration file
- * - documentation
+ * - changes in this constants should be also altered in
+ * - application*.properties
+ * - in deployment configuration file
+ * - documentation
*/
@Test
- public void testSpringParameterLoading(){
+ public void testSpringParameterLoading() {
DriverProperties driverProperties = new DriverProperties();
setFieldWithPropertyAnnotation(driverProperties, "${cbamCatalogUrl}", "cbamCatalogUrl");
setFieldWithPropertyAnnotation(driverProperties, "${cbamLcnUrl}", "cbamLcnUrl");