diff options
author | mark.j.leonard <mark.j.leonard@gmail.com> | 2018-08-07 18:33:38 +0100 |
---|---|---|
committer | mark.j.leonard <mark.j.leonard@gmail.com> | 2018-08-07 18:36:49 +0100 |
commit | 93f9fec9586702a15d6a562ead3d0d432a12b487 (patch) | |
tree | c13557a84a7ccac89431fb0118fd96e74eae9cfc /src/test/java | |
parent | 8ef1cdfadf5d8c112ea1cc6a99f61ed21fb986de (diff) |
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 <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/onap/aai/babel/csar/extractor/YamlExtractorTest.java | 13 |
1 files changed, 11 insertions, 2 deletions
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<Artifact> 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"); } } |