summaryrefslogtreecommitdiffstats
path: root/so-cnf-adapter-application/src/test
diff options
context:
space:
mode:
authorGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-09-08 14:46:29 +0200
committerGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-09-13 10:14:19 +0200
commite71ed345425a2cb734ec89ad1ec19953fde33023 (patch)
tree645693c024aaab9db53e7e981803d71c7f481e0f /so-cnf-adapter-application/src/test
parentf0924be187a9058bf1c024f885ac2ba7a8a90c74 (diff)
Add aai.enabled and remove aai client without version1.9.0
Issue-ID: SO-3747 Signed-off-by: Grzegorz Wielgosinski <g.wielgosins@samsung.com> Change-Id: I5ec30cd4a3ab2efb0bea5377e2d75ce4a2c10a4a
Diffstat (limited to 'so-cnf-adapter-application/src/test')
-rw-r--r--so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/service/aai/AaiServiceTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/service/aai/AaiServiceTest.java b/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/service/aai/AaiServiceTest.java
index 976fc52..f8f9597 100644
--- a/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/service/aai/AaiServiceTest.java
+++ b/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/service/aai/AaiServiceTest.java
@@ -4,6 +4,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
+import org.onap.so.adapters.cnf.AaiConfiguration;
import org.onap.so.adapters.cnf.client.MulticloudClient;
import org.onap.so.adapters.cnf.model.instantiation.AaiRequest;
import org.onap.so.adapters.cnf.model.statuscheck.K8sRbInstanceResourceStatus;
@@ -32,6 +33,8 @@ public class AaiServiceTest {
private AaiRequestSender aaiRequestSender;
@Mock
private AaiResponseParser responseParser;
+ @Mock
+ private AaiConfiguration aaiConfiguration;
@Test
public void shouldTestAaiUpdate() throws BadResponseException {
@@ -51,6 +54,7 @@ public class AaiServiceTest {
when(multicloudClient.getInstanceStatus(instanceId)).thenReturn(instanceStatus);
when(instanceStatus.getResourcesStatus()).thenReturn(resourcesStatus);
when(responseParser.parse(status, aaiRequest)).thenReturn(parseResult);
+ when(aaiConfiguration.isEnabled()).thenReturn(true);
doNothing().when(aaiRequestSender).sendUpdateRequestToAai(parseResult, aaiRequest);
// then
@@ -79,6 +83,7 @@ public class AaiServiceTest {
when(multicloudClient.getInstanceStatus(instanceId)).thenReturn(instanceStatus);
when(instanceStatus.getResourcesStatus()).thenReturn(resourcesStatus);
when(responseParser.parse(status, aaiRequest)).thenReturn(parseResult);
+ when(aaiConfiguration.isEnabled()).thenReturn(true);
doNothing().when(aaiRequestSender).sendUpdateRequestToAai(parseResult, aaiRequest);
// then