From f14b68c0ef0a5305bdf88eb87ac53c3e5cd18844 Mon Sep 17 00:00:00 2001
From: romaingimbert <romain.gimbert@orange.com>
Date: Wed, 11 Dec 2019 09:57:46 +0100
Subject: Update SO request to use GR_API instead of VNF_API

- add GR_API to so request
- request to AAI to retrieve cloud owner id
-add status "inprogress" after check

Issue-ID: EXTAPI-337
Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Change-Id: I34911a3c785aac24f5feb71fede36a142f8fcffe
---
 .../karatetest/features/02--ServiceOrder.feature   | 37 ++++++++++++++++++----
 1 file changed, 30 insertions(+), 7 deletions(-)

(limited to 'src/test/resources/karatetest/features/02--ServiceOrder.feature')

diff --git a/src/test/resources/karatetest/features/02--ServiceOrder.feature b/src/test/resources/karatetest/features/02--ServiceOrder.feature
index b827381..f1ee4bc 100644
--- a/src/test/resources/karatetest/features/02--ServiceOrder.feature
+++ b/src/test/resources/karatetest/features/02--ServiceOrder.feature
@@ -48,7 +48,7 @@ And request $
 When method put
 Then status 201
 And match $.id == serviceOrderId
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
@@ -88,7 +88,7 @@ Given path 'serviceOrder','test',serviceOrderId
 And request $
 When method put
 Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
@@ -106,7 +106,7 @@ Given path 'serviceOrder','test',serviceOrderId
 And request $
 When method put
 Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
@@ -125,7 +125,7 @@ Given path 'serviceOrder','test',serviceOrderId
 And request $
 When method put
 Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
@@ -226,7 +226,7 @@ Given path 'serviceOrder','test',serviceOrderId
 And request $
 When method put
 Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
@@ -284,7 +284,7 @@ Given path 'serviceOrder','test',serviceOrderId
 And request $
 When method put
 Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
 And match $.orderItem[0].state == 'completed'
 Given path 'serviceOrder',serviceOrderId
 When method get
@@ -358,9 +358,10 @@ When method get
 Then status 200
 And match $ == '#[2]'
 Given path 'serviceOrder'
-And params {externalId : 'extid1' , state : 'acknowledged'}
+And params {externalId : 'extid1' , state : 'inProgress'}
 When method get
 Then status 200
+And print response
 And match $ == '#[1]'
 Given path 'serviceOrder',serviceOrderId15
 When method get
@@ -426,6 +427,8 @@ When method get
 Then status 200
 * call Context.startServers();
 
+
+
 Scenario: testCheckServiceOrderWithSDCNotResponding
 * call Context.removeWireMockMapping("/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/metadata");
 Given path 'serviceOrder'
@@ -463,3 +466,23 @@ Given path 'serviceOrder',serviceOrderId
 When method get
 Then status 200
 * call Context.startServers();
+
+Scenario: testCheckServiceOrderNoOwningEntities
+* call Context.removeWireMockMapping("/aai/v14/business/owning-entities");
+Given path 'serviceOrder'
+And request data[9]
+When method post
+Then status 201
+And def serviceOrderId = $.id
+Given path 'serviceOrder','test',serviceOrderId
+And request $
+When method put
+Then status 201
+And match $.state == 'inProgress'
+Given path 'serviceOrder',serviceOrderId
+When method get
+Then status 200
+Given path 'serviceOrder',serviceOrderId
+When method delete
+Then status 204
+* call Context.startServers();
-- 
cgit 1.2.3-korg