diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2024-07-24 09:56:46 +0100 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-07-24 09:06:26 +0000 |
commit | a2f6493f89eff78a78d8ba2aa34f6080d6ab8830 (patch) | |
tree | 62acfbf410ce9986d9d3b2d7d3115fd073bf1d5b /runtime-acm/src | |
parent | b2bc0f63a484abe5b77b1e921d820ae80481602b (diff) |
Fix sonar issue for ACM
Issue-ID: POLICY-5065
Change-Id: Id95e8dbd4be14db36eb2fa4ddfc852d37572f25a
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src')
2 files changed, 15 insertions, 13 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java index 0591ab02c..a7ae99feb 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/instantiation/AutomationCompositionInstantiationProviderTest.java @@ -72,15 +72,17 @@ class AutomationCompositionInstantiationProviderTest { "src/test/resources/rest/acm/AutomationCompositionNotFound.json"; private static final String DELETE_BAD_REQUEST = "Automation composition state is still %s"; - private static final String AC_ELEMENT_NAME_NOT_FOUND = - "\"AutomationComposition\" INVALID, item has status INVALID\n" - + " \"entry PMSHInstance0AcElementNotFound\" INVALID, item has status INVALID\n" - + " \"entry org.onap.domain.pmsh.DCAEMicroservice\" INVALID, Not found\n" - + " \"entry org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement\"" - + " INVALID, Not found\n"; - private static final String AC_DEFINITION_NOT_FOUND = "\"AutomationComposition\" INVALID, item has status INVALID\n" - + " item \"ServiceTemplate\" value \"%s\" INVALID," - + " Commissioned automation composition definition not found\n"; + private static final String AC_ELEMENT_NAME_NOT_FOUND = """ + "AutomationComposition" INVALID, item has status INVALID + "entry PMSHInstance0AcElementNotFound" INVALID, item has status INVALID + "entry org.onap.domain.pmsh.DCAEMicroservice" INVALID, Not found + "entry org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement" INVALID, Not found + """; + private static final String AC_DEFINITION_NOT_FOUND = """ + "AutomationComposition" INVALID, item has status INVALID + item "ServiceTemplate" value "%s" INVALID, Commissioned automation composition definition not found + """; + private static final String DO_NOT_MATCH = " do not match with "; private static ToscaServiceTemplate serviceTemplate = new ToscaServiceTemplate(); diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java index 4842a77a8..ca3b9bfab 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java @@ -70,8 +70,8 @@ class ParticipantControllerTest extends CommonRestController { private static final String PARTICIPANT_JSON2 = "src/test/resources/providers/TestParticipant2.json"; private static final List<Participant> inputParticipants = new ArrayList<>(); - private static final String originalJson = ResourceUtils.getResourceAsString(PARTICIPANT_JSON); - private static final String originalJson2 = ResourceUtils.getResourceAsString(PARTICIPANT_JSON2); + private static final String ORIGINAL_JSON = ResourceUtils.getResourceAsString(PARTICIPANT_JSON); + private static final String ORIGINAL_JSON2 = ResourceUtils.getResourceAsString(PARTICIPANT_JSON2); @Autowired private ParticipantProvider participantProvider; @@ -81,8 +81,8 @@ class ParticipantControllerTest extends CommonRestController { */ @BeforeAll public static void setUpBeforeClass() throws CoderException { - inputParticipants.add(CODER.decode(originalJson, Participant.class)); - inputParticipants.add(CODER.decode(originalJson2, Participant.class)); + inputParticipants.add(CODER.decode(ORIGINAL_JSON, Participant.class)); + inputParticipants.add(CODER.decode(ORIGINAL_JSON2, Participant.class)); } @BeforeEach |