From 93f9fec9586702a15d6a562ead3d0d432a12b487 Mon Sep 17 00:00:00 2001 From: "mark.j.leonard" Date: Tue, 7 Aug 2018 18:33:38 +0100 Subject: Add VF Module Groups to the SD-WAN Service test Create additional TOSCA YAML content for the existing SD-WAN Service CSAR input file, so that the VF Module processing code is invoked. Issue-ID: AAI-1250 Change-Id: I24a842223154d52e1a4a19e5b9cd739b0ceee4f4 Signed-off-by: mark.j.leonard --- .../onap/aai/babel/csar/extractor/YamlExtractorTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/test/java') 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 f783e7c..faeb536 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 @@ -113,13 +113,17 @@ public class YamlExtractorTest { payloads.add("ymlFiles/resource-SdWanTestVsp-template.yml"); payloads.add("ymlFiles/resource-TunnelXconntest-template.yml"); payloads.add("ymlFiles/service-SdWanServiceTest-template.yml"); + payloads.add("ymlFiles/resource-Allotedresource-template.yml"); payloads.add("ymlFiles/artifacts.yml"); payloads.add("ymlFiles/data.yml"); + payloads.add("ymlFiles/groups.yml"); new ArtifactTestUtils().performYmlAsserts(ymlFiles, payloads); } /** + * Call the extractor with the specified arguments and assert that an exception is thrown. + * * @param archive * @param name * @param version @@ -136,12 +140,17 @@ public class YamlExtractorTest { } /** + * Extract Artifacts from the specified CSAR resource. + * * @param resourceName - * @return + * the CSAR file + * @return the extracted artifacts * @throws InvalidArchiveException * @throws IOException + * for I/O errors */ private List extractArchive(String resourceName) throws InvalidArchiveException, IOException { - return new YamlExtractor().extract(new ArtifactTestUtils().getCompressedArtifact(resourceName), resourceName, "v1"); + byte[] csar = new ArtifactTestUtils().getCompressedArtifact(resourceName); + return new YamlExtractor().extract(csar, resourceName, "v1"); } } -- cgit 1.2.3-korg