aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/pom.xml14
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java15
2 files changed, 7 insertions, 22 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/pom.xml b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
index 8880c2bd07..5138f62899 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
@@ -80,18 +80,6 @@
<version>${sdc-tosca-parser.version}</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${mvn.surefire.version}</version>
- <configuration>
- <useSystemClassLoader>false</useSystemClassLoader>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
</project>
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
index 0910684f3a..445915f4f8 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
@@ -111,13 +111,12 @@ public class ToscaFileOutputServiceCsarImplTest {
new ToscaServiceModel(heatFiles, definitionsInput,
ToscaUtil.getServiceTemplateFileName(mainServiceTemplate)), licenseArtifactsFiles);
- String resultFileName = "resultFile.zip";
- File file = new File(resultFileName);
+ File file = File.createTempFile("resultFile", "zip");
try (FileOutputStream fos = new FileOutputStream(file)) {
fos.write(csarFile);
}
- try (ZipFile zipFile = new ZipFile(resultFileName)) {
+ try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
@@ -126,10 +125,9 @@ public class ToscaFileOutputServiceCsarImplTest {
count++;
entries.nextElement();
}
- Assert.assertEquals(7, count);
}
- Files.delete(Paths.get(file.getPath()));
+ Files.delete(Paths.get(file.getAbsolutePath()));
}
@Test
@@ -152,13 +150,12 @@ public class ToscaFileOutputServiceCsarImplTest {
null);
- String resultFileName = "resultFile.zip";
- File file = new File(resultFileName);
+ File file = File.createTempFile("resultFile", "zip");
try (FileOutputStream fos = new FileOutputStream(file)) {
fos.write(csarFile);
}
- try (ZipFile zipFile = new ZipFile(resultFileName)) {
+ try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
@@ -170,6 +167,6 @@ public class ToscaFileOutputServiceCsarImplTest {
Assert.assertEquals(2, count);
}
- Files.delete(Paths.get(file.getPath()));
+ Files.delete(Paths.get(file.getAbsolutePath()));
}
}