aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2018-04-30 16:27:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-30 16:27:55 +0000
commit716e7f240c2f4a71d48e7708aa27194db2dd7f21 (patch)
treef027c16c6dd15174120ce0210054654404795361 /src/test
parent7128e968c7263bae3451221c5826e352e2c13580 (diff)
parente651abed417b8a173a0745042c7dc5b20c0b7036 (diff)
Merge "Convert Babel from AJSC2 to Spring Boot 1.5.12"
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/aai/babel/MicroServiceAuthTest.java2
-rw-r--r--src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java2
-rw-r--r--src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java4
-rw-r--r--src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java4
-rw-r--r--src/test/java/org/onap/aai/babel/logging/LogReader.java4
-rw-r--r--src/test/java/org/onap/aai/babel/logging/TestApplicationLogger.java6
-rw-r--r--src/test/java/org/onap/aai/babel/parser/TestToscaParser.java6
-rw-r--r--src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java6
-rw-r--r--src/test/java/org/onap/aai/babel/service/TestGenerateArtifactsServiceImpl.java7
-rw-r--r--src/test/java/org/onap/aai/babel/service/TestInfoService.java2
-rw-r--r--src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java4
-rw-r--r--src/test/java/org/onap/aai/babel/util/TestRequestValidator.java2
-rw-r--r--src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java6
-rw-r--r--src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java6
-rw-r--r--src/test/resources/logback.xml2
-rw-r--r--src/test/resources/test-babel-beans.xml (renamed from src/test/resources/babel-beans.xml)0
16 files changed, 32 insertions, 31 deletions
diff --git a/src/test/java/org/onap/aai/babel/MicroServiceAuthTest.java b/src/test/java/org/onap/aai/babel/MicroServiceAuthTest.java
index 6912d90..99eb4e9 100644
--- a/src/test/java/org/onap/aai/babel/MicroServiceAuthTest.java
+++ b/src/test/java/org/onap/aai/babel/MicroServiceAuthTest.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
diff --git a/src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java b/src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java
index 9024efa..77517ad 100644
--- a/src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java
+++ b/src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
diff --git a/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java b/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java
index 20c8254..96f1b2d 100644
--- a/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java
+++ b/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -22,7 +22,7 @@ package org.onap.aai.babel.csar.fixture;
import java.util.ArrayList;
import java.util.List;
-import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.onap.sdc.api.notification.IArtifactInfo;
/**
* This class builds an instance of IArtifactInfo for test purposes.
diff --git a/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java b/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java
index dfca951..f686911 100644
--- a/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java
+++ b/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -22,7 +22,7 @@ package org.onap.aai.babel.csar.fixture;
import java.util.Objects;
import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.openecomp.sdc.api.notification.IArtifactInfo;
+import org.onap.sdc.api.notification.IArtifactInfo;
/**
* This class is an implementation of IArtifactInfo for test purposes.
diff --git a/src/test/java/org/onap/aai/babel/logging/LogReader.java b/src/test/java/org/onap/aai/babel/logging/LogReader.java
index c2a8e64..0c4de64 100644
--- a/src/test/java/org/onap/aai/babel/logging/LogReader.java
+++ b/src/test/java/org/onap/aai/babel/logging/LogReader.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
-import org.apache.commons.lang.time.StopWatch;
+import org.apache.commons.lang3.time.StopWatch;
import org.junit.Assert;
public class LogReader {
diff --git a/src/test/java/org/onap/aai/babel/logging/TestApplicationLogger.java b/src/test/java/org/onap/aai/babel/logging/TestApplicationLogger.java
index 8a038b2..ed9dac4 100644
--- a/src/test/java/org/onap/aai/babel/logging/TestApplicationLogger.java
+++ b/src/test/java/org/onap/aai/babel/logging/TestApplicationLogger.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -28,7 +28,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.util.Arrays;
import javax.ws.rs.core.HttpHeaders;
-import org.apache.commons.lang.time.StopWatch;
+import org.apache.commons.lang3.time.StopWatch;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mockito.Mockito;
@@ -47,7 +47,7 @@ public class TestApplicationLogger {
@BeforeClass
public static void setupClass() {
- System.setProperty("AJSC_HOME", ".");
+ System.setProperty("APP_HOME", ".");
}
/**
diff --git a/src/test/java/org/onap/aai/babel/parser/TestToscaParser.java b/src/test/java/org/onap/aai/babel/parser/TestToscaParser.java
index b1f2c01..14fa9f3 100644
--- a/src/test/java/org/onap/aai/babel/parser/TestToscaParser.java
+++ b/src/test/java/org/onap/aai/babel/parser/TestToscaParser.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -50,8 +50,8 @@ import org.onap.aai.babel.xml.generator.data.WidgetConfigurationUtil;
public class TestToscaParser {
static {
- if (System.getProperty("AJSC_HOME") == null) {
- System.setProperty("AJSC_HOME", ".");
+ if (System.getProperty("APP_HOME") == null) {
+ System.setProperty("APP_HOME", ".");
}
}
diff --git a/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java b/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
index c8080e9..9310d2d 100644
--- a/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
+++ b/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -57,8 +57,8 @@ public class CsarToXmlConverterTest {
private CsarToXmlConverter converter;
static {
- if (System.getProperty("AJSC_HOME") == null) {
- System.setProperty("AJSC_HOME", ".");
+ if (System.getProperty("APP_HOME") == null) {
+ System.setProperty("APP_HOME", ".");
}
}
diff --git a/src/test/java/org/onap/aai/babel/service/TestGenerateArtifactsServiceImpl.java b/src/test/java/org/onap/aai/babel/service/TestGenerateArtifactsServiceImpl.java
index b1423b7..5840cd7 100644
--- a/src/test/java/org/onap/aai/babel/service/TestGenerateArtifactsServiceImpl.java
+++ b/src/test/java/org/onap/aai/babel/service/TestGenerateArtifactsServiceImpl.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -59,9 +59,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class TestGenerateArtifactsServiceImpl {
static {
- if (System.getProperty("AJSC_HOME") == null) {
- System.setProperty("AJSC_HOME", ".");
+ if (System.getProperty("APP_HOME") == null) {
+ System.setProperty("APP_HOME", ".");
}
+ System.setProperty("CONFIG_HOME", "src/test/resources");
}
@Inject
diff --git a/src/test/java/org/onap/aai/babel/service/TestInfoService.java b/src/test/java/org/onap/aai/babel/service/TestInfoService.java
index b97aa92..1d60839 100644
--- a/src/test/java/org/onap/aai/babel/service/TestInfoService.java
+++ b/src/test/java/org/onap/aai/babel/service/TestInfoService.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
diff --git a/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java b/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java
index 5a4224c..69d7819 100644
--- a/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java
+++ b/src/test/java/org/onap/aai/babel/util/ArtifactTestUtils.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -79,7 +79,7 @@ public class ArtifactTestUtils {
}
public String loadResourceAsString(String resourceName) throws IOException {
- return IOUtils.toString(getResource(resourceName));
+ return IOUtils.toString(getResource(resourceName), Charset.defaultCharset());
}
private void compareXMLPayloads(List<Artifact> toscaFiles, Set<String> ymlPayloads) {
diff --git a/src/test/java/org/onap/aai/babel/util/TestRequestValidator.java b/src/test/java/org/onap/aai/babel/util/TestRequestValidator.java
index bffe419..aff27cc 100644
--- a/src/test/java/org/onap/aai/babel/util/TestRequestValidator.java
+++ b/src/test/java/org/onap/aai/babel/util/TestRequestValidator.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java
index d02b817..b4ce96d 100644
--- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java
+++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -42,8 +42,8 @@ import org.onap.aai.babel.xml.generator.model.Widget.Type;
public class TestVfModule {
static {
- if (System.getProperty("AJSC_HOME") == null) {
- System.setProperty("AJSC_HOME", ".");
+ if (System.getProperty("APP_HOME") == null) {
+ System.setProperty("APP_HOME", ".");
}
}
diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
index e33de67..6f2dcca 100644
--- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
+++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
@@ -1,5 +1,5 @@
/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
@@ -29,8 +29,8 @@ import org.onap.aai.babel.xml.generator.model.Widget.Type;
public class TestWidget {
static {
- if (System.getProperty("AJSC_HOME") == null) {
- System.setProperty("AJSC_HOME", ".");
+ if (System.getProperty("APP_HOME") == null) {
+ System.setProperty("APP_HOME", ".");
}
}
diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml
index 4f51317..376eb79 100644
--- a/src/test/resources/logback.xml
+++ b/src/test/resources/logback.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="true">
<property name="componentName" value="AAI-BAS" />
- <property name="logDirectory" value="${AJSC_HOME}/logs/${componentName}" />
+ <property name="logDirectory" value="./logs/${componentName}" />
<!-- default EELF log file names -->
<property name="generalLogName" value="error" />
diff --git a/src/test/resources/babel-beans.xml b/src/test/resources/test-babel-beans.xml
index f102337..f102337 100644
--- a/src/test/resources/babel-beans.xml
+++ b/src/test/resources/test-babel-beans.xml