From 9c94d11d63d9016af74dcf3a2fd72d50955eace2 Mon Sep 17 00:00:00 2001 From: talio Date: Thu, 14 Sep 2017 10:54:21 +0300 Subject: Removing service templates without node templates Bugfix for cases where we have substitution service templates without node templates Issue - ID : SDC-330 Change-Id: Ia9f33ce90fe0dbcc8ca2596ca63da704a48c7e67 Signed-off-by: talio --- .../nested/single/TranslateHeatNestedSingle.java | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java index f81da11bc9..38df156efc 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/impl/heattotosca/nested/single/TranslateHeatNestedSingle.java @@ -20,21 +20,39 @@ package org.openecomp.sdc.translator.impl.heattotosca.nested.single; +import org.junit.Before; import org.junit.Test; import org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.ConsolidationDataTestUtil; import org.openecomp.sdc.translator.services.heattotosca.buildconsolidationdata.TestConstants; import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest; +import java.io.IOException; + public class TranslateHeatNestedSingle extends BaseResourceTranslationTest { - { - inputFilesPath = "/mock/heat/nested/single/inputs"; - outputFilesPath = "/mock/heat/nested/single/expectedoutputfiles"; + @Override + @Before + public void setUp() throws IOException { + // do not delete this function. it prevents the superclass setup from running } + @Test public void testTranslate() throws Exception { + inputFilesPath = "/mock/heat/nested/single/inputs"; + outputFilesPath = "/mock/heat/nested/single/expectedoutputfiles"; + + initTranslatorAndTranslate(); testTranslation(); validateNestedTemplateConsolidationData(TestConstants.TEST_SINGLE_NESTED_RESOURCE); } + + @Test + public void testTranslateNestedWithoutNodeTemplates() throws IOException { + inputFilesPath = "/mock/heat/nested/nestedwithoutNodeTemplates/inputs"; + outputFilesPath = "/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles"; + + initTranslatorAndTranslate(); + testTranslation(); + } } -- cgit 1.2.3-korg