Fixed test issue

This commit is contained in:
Luca Frosini 2024-11-13 11:40:25 +01:00
parent 6160f73bc2
commit bcb55ea4e9
1 changed files with 4 additions and 1 deletions

View File

@ -230,18 +230,21 @@ public class QueryTemplateManagementTest extends ContextTest {
stateTemplateVariable.setName(STATE_VARIABLE_NAME);
stateTemplateVariable.setDescription("StateFacet value");
stateTemplateVariable.setDefaultValue("running");
stateTemplateVariable.setPropertyType("String");
queryTemplate.addTemplateVariable(stateTemplateVariable);
TemplateVariable nameTemplateVariable = new TemplateVariableImpl();
nameTemplateVariable.setName(NAME_VARIABLE_NAME);
nameTemplateVariable.setDescription("SoftwareFacet name");
nameTemplateVariable.setDefaultValue("resource-registry");
nameTemplateVariable.setPropertyType("String");
queryTemplate.addTemplateVariable(nameTemplateVariable);
TemplateVariable groupTemplateVariable = new TemplateVariableImpl();
groupTemplateVariable.setName(GROUP_VARIABLE_NAME);
groupTemplateVariable.setDescription("SoftwareFacet group");
groupTemplateVariable.setDefaultValue("information-system");
groupTemplateVariable.setPropertyType("String");
queryTemplate.addTemplateVariable(groupTemplateVariable);
return queryTemplate;
@ -249,7 +252,7 @@ public class QueryTemplateManagementTest extends ContextTest {
protected JsonNode getTemplate() throws Exception {
File queryTemplatesDirectory = getQueryTemplatesDirectory();
File jsonQueryTemplateFile = new File(queryTemplatesDirectory, "queryTemplate" + 1 + ".json");
File jsonQueryTemplateFile = new File(queryTemplatesDirectory, "queryTemplate1.json");
ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonNode = objectMapper.readTree(jsonQueryTemplateFile);
return jsonNode;