summaryrefslogtreecommitdiffstats
path: root/src/test/resources/karatetest/features
diff options
context:
space:
mode:
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>2019-03-04 16:04:21 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-04 16:04:21 +0000
commit54f4f123ca4fd37ded22dc7887a4bb7bb468f01b (patch)
tree79ad4c838dcc9432bad0c7688b514f9f9655153c /src/test/resources/karatetest/features
parente0e7ba60753556c5a135ebc057ad3780cddacb28 (diff)
parentd6df1fa47283fd52c8b1970d16c994919203f59e (diff)
Merge "Add DMaaP Integration to retrieve AAI-EVENT"
Diffstat (limited to 'src/test/resources/karatetest/features')
-rw-r--r--src/test/resources/karatetest/features/03--Subscriber.feature94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/test/resources/karatetest/features/03--Subscriber.feature b/src/test/resources/karatetest/features/03--Subscriber.feature
index 6e4b884..e4704ea 100644
--- a/src/test/resources/karatetest/features/03--Subscriber.feature
+++ b/src/test/resources/karatetest/features/03--Subscriber.feature
@@ -154,4 +154,98 @@ When method delete
Then status 204
Given path 'serviceOrder',serviceOrderId
When method delete
+Then status 204
+
+
+Scenario: testSubscriberWithTestListenerForServiceInventorCreationEvents
+* def listenerUrl = nbiBaseUrl + "/test/listener"
+Given path 'test/listener'
+When method delete
+Then status 204
+Given path 'hub'
+And request { id : 'id', callback : '#(listenerUrl)' , query : 'eventType = ServiceCreationNotification' }
+When method post
+Then status 201
+Given path 'hub'
+When method get
+And def hubId = $[0].id
+Given path 'hub/testaaievents'
+Then status 200
+When method get
+Given path 'test/listener'
+And params {serviceInstanceId : 'new-test5'}
+And retry until responseStatus == 200
+When method get
+And assert response.length == 1
+And match $[0] contains { eventId : '#notnull' , eventType : 'ServiceCreationNotification' , eventDate : '#notnull' , event :'#notnull'}
+And def eventId = $[0].eventId
+And def eventDate = $[0].eventDate
+And call checkDateFormat(eventDate)
+Given path 'hub',hubId
+When method delete
+Then status 204
+Given path 'test/listener',eventId
+When method delete
+Then status 204
+
+Scenario: testSubscriberWithTestListenerForServiceInventoryUpdateEvents
+* def listenerUrl = nbiBaseUrl + "/test/listener"
+Given path 'test/listener'
+When method delete
+Then status 204
+Given path 'hub'
+And request { id : 'id', callback : '#(listenerUrl)' , query : 'eventType = ServiceAttributeValueChangeNotification' }
+When method post
+Then status 201
+Given path 'hub'
+When method get
+And def hubId = $[0].id
+Given path 'hub/testaaievents'
+Then status 200
+When method get
+Given path 'test/listener'
+And params {serviceInstanceId : 'new-test5'}
+And retry until responseStatus == 200
+When method get
+And assert response.length == 1
+And match $[0] contains { eventId : '#notnull' , eventType : 'ServiceAttributeValueChangeNotification' , eventDate : '#notnull' , event :'#notnull'}
+And def eventId = $[0].eventId
+And def eventDate = $[0].eventDate
+And call checkDateFormat(eventDate)
+Given path 'hub',hubId
+When method delete
+Then status 204
+Given path 'test/listener',eventId
+When method delete
+Then status 204
+
+Scenario: testSubscriberWithTestListenerForServiceInventoryRemoveEvents
+* def listenerUrl = nbiBaseUrl + "/test/listener"
+Given path 'test/listener'
+When method delete
+Then status 204
+Given path 'hub'
+And request { id : 'id', callback : '#(listenerUrl)' , query : 'eventType = ServiceRemoveNotification' }
+When method post
+Then status 201
+Given path 'hub'
+When method get
+And def hubId = $[0].id
+Given path 'hub/testaaievents'
+Then status 200
+When method get
+Given path 'test/listener'
+And params {serviceInstanceId : 'new-test5'}
+And retry until responseStatus == 200
+When method get
+And assert response.length == 1
+And match $[0] contains { eventId : '#notnull' , eventType : 'ServiceRemoveNotification' , eventDate : '#notnull' , event :'#notnull'}
+And def eventId = $[0].eventId
+And def eventDate = $[0].eventDate
+And call checkDateFormat(eventDate)
+Given path 'hub',hubId
+When method delete
+Then status 204
+Given path 'test/listener',eventId
+When method delete
Then status 204 \ No newline at end of file