aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/karate-config.js3
-rw-r--r--src/test/resources/karatetest/features/02--ServiceOrder.feature4
-rw-r--r--src/test/resources/karatetest/features/05--ListenerResourceTestTarget.feature12
3 files changed, 10 insertions, 9 deletions
diff --git a/src/test/java/karate-config.js b/src/test/java/karate-config.js
index 4b81173..882892e 100644
--- a/src/test/java/karate-config.js
+++ b/src/test/java/karate-config.js
@@ -1,6 +1,7 @@
function() {
var config = {
- nbiBaseUrl: 'http://localhost:8080/nbi/api/v4'
+ nbiBaseUrl: 'http://localhost:8080/nbi/api/v4',
+ targetHeader: 'http://localhost:8080/nbi/api/v4'
};
karate.configure('connectTimeout', 5000);
karate.configure('readTimeout', 5000);
diff --git a/src/test/resources/karatetest/features/02--ServiceOrder.feature b/src/test/resources/karatetest/features/02--ServiceOrder.feature
index f1ee4bc..f5985a9 100644
--- a/src/test/resources/karatetest/features/02--ServiceOrder.feature
+++ b/src/test/resources/karatetest/features/02--ServiceOrder.feature
@@ -376,7 +376,7 @@ Then status 204
Scenario: testCheckServiceOrderWithTargetHeader
Given path 'serviceOrder'
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
And request data[0]
When method post
Then status 201
@@ -384,7 +384,7 @@ And match $.id contains '#notnull'
And match $.state == 'acknowledged'
And def serviceOrderId = $.id
Given path 'serviceOrder',serviceOrderId
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
When method get
Then status 200
diff --git a/src/test/resources/karatetest/features/05--ListenerResourceTestTarget.feature b/src/test/resources/karatetest/features/05--ListenerResourceTestTarget.feature
index 52cc91f..6639d37 100644
--- a/src/test/resources/karatetest/features/05--ListenerResourceTestTarget.feature
+++ b/src/test/resources/karatetest/features/05--ListenerResourceTestTarget.feature
@@ -35,18 +35,18 @@ function(s) {
Scenario: testcreateEventSubscription
Given path 'hub'
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
And request data[0]
When method post
Then status 201
And def hubId = $.id
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
Given path 'hub',hubId
When method get
Then status 200
And match hubId == $.id
Given path 'hub',hubId
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
When method delete
Then status 204
@@ -56,14 +56,14 @@ Given path 'test/listener'
When method delete
Then status 204
Given path 'hub'
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
And request { callback : '#(listenerUrl)' , query : 'eventType = ServiceOrderCreationNotification' }
When method post
Then status 201
And def hubId = $.id
Given path 'serviceOrder'
And request serviceOrderData[17]
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
When method post
Then status 201
And def serviceOrderId = $.id
@@ -80,7 +80,7 @@ Given path 'serviceOrder',serviceOrderId
When method delete
Then status 204
Given path 'hub',hubId
-And header Target = 'http://localhost:8080/nbi/api/v4'
+And header Target = targetHeader
When method delete
Then status 204
Given path 'test/listener',eventId