aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-03-24 08:51:20 -0700
committersebdet <sebastien.determe@intl.att.com>2020-03-24 08:51:20 -0700
commite65d457a2dfd6ebb5e1f5a28b74f05c16c285dc3 (patch)
treec1b72bb7924c826484b89d931f6a4a298082e64a /src/test/java
parentafac3121bfacc4d81903b1d8492613b0b77d3298 (diff)
Improve metadata support
Improve the metadata support for CDS and default values Issue-ID: CLAMP-786 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I8a24e31a93ff1e288ec8f0f6d522b1b15d39a8d2
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java4
-rw-r--r--src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java b/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java
index 2faf38f0a..092d35b0d 100644
--- a/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java
+++ b/src/test/java/org/onap/clamp/clds/tosca/DictionaryRepositoriesTestItCase.java
@@ -76,12 +76,12 @@ public class DictionaryRepositoriesTestItCase {
dictionaryRepository.save(dictionaryTest1);
List<String> res1 = dictionaryRepository.getAllDictionaryNames();
- assertThat(res1.size()).isGreaterThan(1);
+ assertThat(res1.size()).isEqualTo(1);
assertThat(res1).contains("testDictionary1");
dictionaryRepository.save(dictionaryTest2);
List<String> res2 = dictionaryRepository.getAllDictionaryNames();
- assertThat(res2.size()).isGreaterThan(2);
+ assertThat(res2.size()).isEqualTo(2);
assertThat(res2).contains("testDictionary1");
assertThat(res2).contains("testDictionary2");
}
diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java b/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java
index 3ff6ffb33..ea11f8004 100644
--- a/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java
+++ b/src/test/java/org/onap/clamp/clds/tosca/update/ToscaConverterWithDictionarySupportItCase.java
@@ -41,10 +41,12 @@ import org.onap.clamp.tosca.DictionaryService;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class)
+@ActiveProfiles(profiles = "clamp-default,clamp-default-user,default-dictionary-elements")
public class ToscaConverterWithDictionarySupportItCase {
@Autowired
@@ -108,7 +110,8 @@ public class ToscaConverterWithDictionarySupportItCase {
JsonTemplateManager jsonTemplateManager =
new JsonTemplateManager(
- ResourceFileUtil.getResourceAsString("tosca/new-converter/tosca_metadata_clamp_possible_values.yaml"),
+ ResourceFileUtil
+ .getResourceAsString("tosca/new-converter/tosca_metadata_clamp_possible_values.yaml"),
ResourceFileUtil.getResourceAsString("clds/tosca-converter/default-tosca-types.yaml"),
ResourceFileUtil.getResourceAsString("clds/tosca-converter/templates.json"));