diff options
author | aosull01 <adrian.osullivan@huawei.com> | 2019-02-25 16:09:30 +0000 |
---|---|---|
committer | aosull01 <adrian.osullivan@huawei.com> | 2019-03-01 15:02:00 +0000 |
commit | d6df1fa47283fd52c8b1970d16c994919203f59e (patch) | |
tree | 73c0aa638aea28328de145326b60f43856f1105f /src/test/resources/karatetest | |
parent | 44a7f7d91b329a26fb814428af4a230d35ceff50 (diff) |
Add DMaaP Integration to retrieve AAI-EVENT
Change-Id: I94e5eec12fe22b1785a00de530e080a842f37a40
Issue-ID: EXTAPI-201
Signed-off-by: aosull01 <adrian.osullivan@huawei.com>
Diffstat (limited to 'src/test/resources/karatetest')
-rw-r--r-- | src/test/resources/karatetest/features/03--Subscriber.feature | 94 |
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 |