diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src')
2 files changed, 4 insertions, 4 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java index 0533961d23..c4a83e01d4 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java @@ -127,6 +127,7 @@ public class BaseFullTranslationTest { } } assertEquals(0, expectedResultFileNameSet.size()); + translatedZipFile.delete(); } private File translateZipFile(String basePath, HeatToToscaTranslator heatToToscaTranslator) throws IOException { @@ -143,8 +144,7 @@ public class BaseFullTranslationTest { .withId("Validation Error").withCategory(ErrorCategory.APPLICATION).build()); } - File file = new File(path + "/VSP.zip"); - file.createNewFile(); + File file = File.createTempFile("VSP", "zip"); try (FileOutputStream fos = new FileOutputStream(file)) { ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl(); diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java index e784f94df9..ddc13427a7 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java @@ -158,6 +158,7 @@ public class BaseResourceTranslationTest { } } assertEquals(0, expectedResultFileNameSet.size()); + translatedZipFile.delete(); } private File translateZipFile() throws IOException { @@ -173,8 +174,7 @@ public class BaseResourceTranslationTest { "Error in validation " + getErrorAsString(translatorOutput.getErrorMessages())) .withId("Validation Error").withCategory(ErrorCategory.APPLICATION).build()); } - File file = new File(path + "/" + zipFilename); - file.createNewFile(); + File file = File.createTempFile("VSP", "zip"); try (FileOutputStream fos = new FileOutputStream(file)) { ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl(); |