From 91abe4d991457ecb2119edd8cacb7f5fdfcaf741 Mon Sep 17 00:00:00 2001 From: "Kalkere Ramesh, Sharan (sk720x)" Date: Mon, 10 Dec 2018 15:45:55 -0500 Subject: fixed aai response code in updateAAIVfModule Added PUAAIVfMod_updateVfModuleResponseCode to be set to execution Added responseCode verification in unit tests Set UAAIVfMod_updateVfModuleResponseCode Change-Id: I0d429388ff49ae78241ad1b0f33815a80f749061 Issue-ID: SO-1313 Signed-off-by: Kalkere Ramesh, Sharan (sk720x) --- .../org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bpmn/MSOCommonBPMN/src/test/groovy') diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy index cb9bb5c541..2d2f58b415 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy @@ -113,6 +113,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { when(mockExecution.getVariable(prefix + "getVfModuleResponse")).thenReturn(vfModule) doNothing().when(client).update(isA(AAIResourceUri.class), anyObject()) updateAAIVfModule.updateVfModule(mockExecution) + verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 200) } @Test @@ -128,6 +129,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { doThrow(new NotFoundException("Vf Module not found")).when(client).update(isA(AAIResourceUri.class), anyObject()) thrown.expect(BpmnError.class) updateAAIVfModule.updateVfModule(mockExecution) + verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 404) } @@ -144,6 +146,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { doThrow(new IllegalStateException("Error in AAI client")).when(client).update(isA(AAIResourceUri.class), anyObject()) thrown.expect(BpmnError.class) updateAAIVfModule.updateVfModule(mockExecution) + verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 500) } } -- cgit 1.2.3-korg