summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/onap/src
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2021-01-27 19:14:55 +0000
committerGerrit Code Review <gerrit@onap.org>2021-01-27 19:14:55 +0000
commit0a405a9b4515f960d36d254032db680e97ab1e94 (patch)
tree6b8bd025230355eb1caf07885dee14c8d476812c /mod/bpgenerator/onap/src
parenta958d9600cec4c9599d517178457228577542829 (diff)
parent848e92cfd43797c891399319752c9fd07b036f19 (diff)
Merge "Add support for config_volume in blueprint generator"
Diffstat (limited to 'mod/bpgenerator/onap/src')
-rw-r--r--mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapTestUtils.java7
-rw-r--r--mod/bpgenerator/onap/src/test/resources/componentspecs/ves.json4
2 files changed, 11 insertions, 0 deletions
diff --git a/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapTestUtils.java b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapTestUtils.java
index 01845ab..4b37ed8 100644
--- a/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapTestUtils.java
+++ b/mod/bpgenerator/onap/src/test/java/org/onap/blueprintgenerator/test/OnapTestUtils.java
@@ -4,6 +4,7 @@
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. All rights reserved.
* * ================================================================================
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
@@ -44,6 +45,7 @@ import org.springframework.stereotype.Component;
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -364,6 +366,11 @@ public class OnapTestUtils extends BlueprintGeneratorTests {
assertNotNull(
type + " Blueprint:NodeTemplates:DockerConfig:LiveHealthcheck Section is NULL",
onapVolumes);
+ assertNotNull(type + " Blueprint:NodeTemplates:DockerConfig:Volumes:ConfigVolume:GetName Section is NULL", Arrays.stream(onapVolumes)
+ .filter(c -> c.getConfigVolume() != null)
+ .filter(c -> c.getName() != null)
+ .filter(c -> c.equals("myConfig"))
+ .findAny());
}
/**
diff --git a/mod/bpgenerator/onap/src/test/resources/componentspecs/ves.json b/mod/bpgenerator/onap/src/test/resources/componentspecs/ves.json
index 822a7b1..8a64e71 100644
--- a/mod/bpgenerator/onap/src/test/resources/componentspecs/ves.json
+++ b/mod/bpgenerator/onap/src/test/resources/componentspecs/ves.json
@@ -316,6 +316,10 @@
"host": {
"path": "/opt/logs/DCAE/VESCollector/etc"
}
+ },
+ {
+ "container": { "bind": "/opt/app/etc/config" },
+ "config_volume": { "name":"myConfig" }
}
],
"ports": [