diff --git a/helm-charts/values.yaml b/helm-charts/values.yaml index eb8c3765c0..758654e590 100644 --- a/helm-charts/values.yaml +++ b/helm-charts/values.yaml @@ -123,7 +123,7 @@ wso2: strategy: RollingUpdate replicas: 1 imagePullPolicy: IfNotPresent - image: apk-adapter:1.2.0-SNAPSHOT + image: apk-adapter:1.3.0-SNAPSHOT security: sslHostname: "adapter" logging: @@ -156,8 +156,8 @@ wso2: failureThreshold: 5 strategy: RollingUpdate replicas: 1 - imagePullPolicy: Always - image: wso2/apk-common-controller:1.2.0 + imagePullPolicy: IfNotPresent + image: apk-common-controller:1.3.0-SNAPSHOT security: sslHostname: "commoncontroller" # configs: @@ -245,7 +245,7 @@ wso2: failureThreshold: 5 strategy: RollingUpdate imagePullPolicy: IfNotPresent - image: apk-enforcer:1.2.0-SNAPSHOT + image: apk-enforcer:1.3.0-SNAPSHOT security: sslHostname: "enforcer" # logging: diff --git a/runtime/config-deployer-service/ballerina/APIClient.bal b/runtime/config-deployer-service/ballerina/APIClient.bal index fc6203bed8..f7b2963473 100644 --- a/runtime/config-deployer-service/ballerina/APIClient.bal +++ b/runtime/config-deployer-service/ballerina/APIClient.bal @@ -32,7 +32,7 @@ import wso2/apk_common_lib as commons; public class APIClient { - # This function used to convert APKInternalAPI model to APKConf. + # This function to convert APKInternalAPI model to APKConf. # # + api - APKInternalAPI model # + return - APKConf model. diff --git a/test/cucumber-tests/src/test/resources/tests/agent-dptocp/Deployment.feature b/test/cucumber-tests/src/test/resources/tests/agent-dptocp/Deployment.feature index 2f58ece937..3664e8d68b 100644 --- a/test/cucumber-tests/src/test/resources/tests/agent-dptocp/Deployment.feature +++ b/test/cucumber-tests/src/test/resources/tests/agent-dptocp/Deployment.feature @@ -31,7 +31,7 @@ Feature: API Deploying in DP to CP Flow Then the response status code should be 200 And the response body should contain "accessToken" Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://carbon.super.gw.wso2.com:9095/endpoint/3.14/employee" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/APIBackendBasedAIRatelimit.feature b/test/cucumber-tests/src/test/resources/tests/api/APIBackendBasedAIRatelimit.feature index 5c18d0e097..7df02a3d61 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/APIBackendBasedAIRatelimit.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/APIBackendBasedAIRatelimit.feature @@ -4,7 +4,7 @@ Feature: API backend based AI ratelimit Feature Given The system is ready And I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api/v1.0.0/3.14/employee?send=body" with body "" Then the response status code should be 200 @@ -55,7 +55,7 @@ Feature: API backend based AI ratelimit Feature Given The system is ready And I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-header/v1.0.0/3.14/employee?send=header" with body "" Then the response status code should be 200 @@ -91,7 +91,7 @@ Feature: API backend based AI ratelimit Feature Given The system is ready And I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api/v1.0.0/3.14/employee?send=header" with body "" Then the response status code should be 200 @@ -111,7 +111,7 @@ Feature: API backend based AI ratelimit Feature And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/backend-based-airl/1.0.0/employee?send=body" with body "" Then the response status code should be 200 diff --git a/test/cucumber-tests/src/test/resources/tests/api/APIDefinitionEndpoint.feature b/test/cucumber-tests/src/test/resources/tests/api/APIDefinitionEndpoint.feature index b96dff9607..06e26d4b9c 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/APIDefinitionEndpoint.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/APIDefinitionEndpoint.feature @@ -7,7 +7,7 @@ Feature: API Definition Endpoint And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body "" And I eventually receive 200 response code, not accepting |429| @@ -23,7 +23,7 @@ Feature: API Definition Endpoint And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-custom/3.14/docs" with body "" And I eventually receive 200 response code, not accepting |429| @@ -46,7 +46,7 @@ Feature: API Definition Endpoint Then the response status code should be 200 And I wait for 1 minute Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body "" Then the response status code should be 404 And I send "GET" request to "https://default.gw.wso2.com:9095/test-definition-default/api-definition" with body "" @@ -65,7 +65,7 @@ Feature: API Definition Endpoint Then the response status code should be 200 And I wait for 1 minute Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/test-definition-default/3.14/api-definition" with body "" Then the response status code should be 404 And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/test-definition-default/api-definition" with body "" diff --git a/test/cucumber-tests/src/test/resources/tests/api/APISubscription.feature b/test/cucumber-tests/src/test/resources/tests/api/APISubscription.feature index 36304a6ab4..f86b892d49 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/APISubscription.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/APISubscription.feature @@ -7,7 +7,7 @@ Feature: API Subscription Feature And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" And I eventually receive 403 response code, not accepting |429| @@ -15,7 +15,7 @@ Feature: API Subscription Feature Then the response status code should be 403 Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120005" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" And I eventually receive 200 response code, not accepting |429| @@ -25,7 +25,7 @@ Feature: API Subscription Feature Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120006" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120006-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120006-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" And I eventually receive 200 response code, not accepting |429| @@ -36,7 +36,7 @@ Feature: API Subscription Feature |429| Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120007" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120007-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120007-token}| And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" Then the response status code should be 200 And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" @@ -45,7 +45,7 @@ Feature: API Subscription Feature |429| Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120008" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120008-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120008-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" And I eventually receive 403 response code, not accepting |200| @@ -56,7 +56,7 @@ Feature: API Subscription Feature |429| Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120009" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120009-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120009-token}| And I send "GET" request to "https://default.sandbox.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" Then the response status code should be 403 And I send "GET" request to "https://default.gw.wso2.com:9095/subscription-api/1.0.0/endpoint1" with body "" diff --git a/test/cucumber-tests/src/test/resources/tests/api/APISubscriptionBasedAIRatelimit.feature b/test/cucumber-tests/src/test/resources/tests/api/APISubscriptionBasedAIRatelimit.feature index 3209f9360b..8b7379655d 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/APISubscriptionBasedAIRatelimit.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/APISubscriptionBasedAIRatelimit.feature @@ -4,7 +4,7 @@ Feature: API subscription based AI ratelimit Feature And I have a valid subscription Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120065" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}| And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-subs/v1.0.0/3.14/employee?send=body" with body "" Then the response status code should be 200 @@ -41,7 +41,7 @@ Feature: API subscription based AI ratelimit Feature And I have a valid subscription Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120065" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120065-token}| And I wait for next minute strictly And I send "GET" request to "https://default.gw.wso2.com:9095/llm-api-subs/v1.0.0/3.14/employee?send=header" with body "" Then the response status code should be 200 diff --git a/test/cucumber-tests/src/test/resources/tests/api/BackendAPIKeyAuth.feature b/test/cucumber-tests/src/test/resources/tests/api/BackendAPIKeyAuth.feature index 97d1a18507..764aa04f5b 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/BackendAPIKeyAuth.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/BackendAPIKeyAuth.feature @@ -7,7 +7,7 @@ Feature: Backend API Key auth And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/backend-api-key-security/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -28,7 +28,7 @@ Feature: Backend API Key auth Given The system is ready And I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/backend-api-key-security/3.14/employee/" with body "" And I eventually receive 404 response code, not accepting | 200 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/BackendRetry.feature b/test/cucumber-tests/src/test/resources/tests/api/BackendRetry.feature index a9451fa629..553f782be8 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/BackendRetry.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/BackendRetry.feature @@ -7,7 +7,7 @@ Feature: BackendRetry And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/backend-retry/3.14/retry" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/BackendTimeout.feature b/test/cucumber-tests/src/test/resources/tests/api/BackendTimeout.feature index 1c3279a9a0..9142e8b9c0 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/BackendTimeout.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/BackendTimeout.feature @@ -7,7 +7,7 @@ Feature: BackendTimeout And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/backend-timeout/3.14/delay/2" with body "" And I eventually receive 504 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/BasicAuth.feature b/test/cucumber-tests/src/test/resources/tests/api/BasicAuth.feature index 603680b21f..98cb29b5e2 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/BasicAuth.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/BasicAuth.feature @@ -7,7 +7,7 @@ Feature: Basic auth And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/basic-auth/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -36,7 +36,7 @@ Feature: Basic auth Given The system is ready And I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/basic-auth/3.14/employee/" with body "" And I eventually receive 404 response code, not accepting | 200 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/BasicDeploymentAndApiInvocation.feature b/test/cucumber-tests/src/test/resources/tests/api/BasicDeploymentAndApiInvocation.feature index 8fb5f7f62d..9aaadbbec2 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/BasicDeploymentAndApiInvocation.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/BasicDeploymentAndApiInvocation.feature @@ -7,7 +7,7 @@ Feature: API Deployment and invocation And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 429 | @@ -20,7 +20,7 @@ Feature: API Deployment and invocation And I send "DELETE" request to "https://default.gw.wso2.com:9095/test/3.14/employee/12" with body "" And the response status code should be 200 Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body "" And the response status code should be 401 And I send "POST" request to "https://default.gw.wso2.com:9095/test/3.14/employee/" with body "" @@ -42,7 +42,7 @@ Feature: API Deployment and invocation And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I wait for next minute And I send "GET" request to "https://default.gw.wso2.com:9095/test-version/1.0/employee/" with body "" And I eventually receive 200 response code, not accepting @@ -59,7 +59,7 @@ Feature: API Deployment and invocation And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test-default/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 429 | @@ -91,7 +91,7 @@ Feature: API Deployment and invocation And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithoutscope/" with body "" And I eventually receive 200 response code, not accepting | 429 | @@ -100,7 +100,7 @@ Feature: API Deployment and invocation Given I have a valid subscription with scopes | scope1 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithoutscope/" with body "" And I eventually receive 200 response code, not accepting | 429 | @@ -117,7 +117,7 @@ Feature: API Deployment and invocation | scope1 | | scope2 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/test-scope/1.0.0/employeewithscopes/" with body "" And I eventually receive 200 response code, not accepting | 429 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/CircuitBreaker.feature b/test/cucumber-tests/src/test/resources/tests/api/CircuitBreaker.feature index 927f682b08..ec888a6a97 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/CircuitBreaker.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/CircuitBreaker.feature @@ -7,7 +7,7 @@ Feature: BackendRetry And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "POST" request to "https://default.gw.wso2.com:9095/circuit-breaker/3.14/set-retry-count" with body "{\"count\": 500}" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/CircuitBreakerMaxRequest.feature b/test/cucumber-tests/src/test/resources/tests/api/CircuitBreakerMaxRequest.feature index 705430b751..0c2aca7be8 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/CircuitBreakerMaxRequest.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/CircuitBreakerMaxRequest.feature @@ -7,7 +7,7 @@ Feature: circuitBreakerMaxRequest And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/circuit-breaker-max-request/3.14/anything/test" with body "" And I eventually receive 200 response code, not accepting |429| @@ -23,7 +23,7 @@ Feature: circuitBreakerMaxRequest And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/circuit-breaker-max-request-v1/3.14/anything/test" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/CustomRatelimit.feature b/test/cucumber-tests/src/test/resources/tests/api/CustomRatelimit.feature index 5b7c0ecea3..07a504f667 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/CustomRatelimit.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/CustomRatelimit.feature @@ -7,7 +7,7 @@ Feature: Custom ratelimit And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | user_id | bob | | org_id | wso2 | And I wait for next minute diff --git a/test/cucumber-tests/src/test/resources/tests/api/DifferentEndpointResourceLevel.feature b/test/cucumber-tests/src/test/resources/tests/api/DifferentEndpointResourceLevel.feature index cc9a7c18eb..c84bff43e3 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/DifferentEndpointResourceLevel.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/DifferentEndpointResourceLevel.feature @@ -7,7 +7,7 @@ Feature: API different endpoint resource level And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/test-different-endpoint-resource-level/3.14/endpoint1" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/DifferentSandProdEndpoint.feature b/test/cucumber-tests/src/test/resources/tests/api/DifferentSandProdEndpoint.feature index 8f8c028367..b71da1ecc3 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/DifferentSandProdEndpoint.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/DifferentSandProdEndpoint.feature @@ -7,7 +7,7 @@ Feature: API different endpoint resource level And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/test-different-sand-prod-endpoint/3.14/endpoint1" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/Endpoint.feature b/test/cucumber-tests/src/test/resources/tests/api/Endpoint.feature index f9d8c30747..3358f9e992 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/Endpoint.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/Endpoint.feature @@ -7,7 +7,7 @@ Feature: Endpoint And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/endpoint/3.14/employee" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/GRPC.feature b/test/cucumber-tests/src/test/resources/tests/api/GRPC.feature index 39dbf6ae35..886101dd2a 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/GRPC.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/GRPC.feature @@ -21,7 +21,7 @@ Feature: Generating APK conf for gRPC API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 0 And the student response body should contain name: "Student" age: 10 @@ -40,7 +40,7 @@ Feature: Generating APK conf for gRPC API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | Host | default.gw.wso2.com | And I send "GET" request to "https://default.gw.wso2.com:9095/org.apk.v1/api-definition/" with body "" And I eventually receive 200 response code, not accepting @@ -80,13 +80,13 @@ Feature: Generating APK conf for gRPC API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 7 Given I have a valid subscription with scopes | wso2 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 0 And the student response body should contain name: "Student" age: 10 @@ -105,13 +105,13 @@ Feature: Generating APK conf for gRPC API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 0 And the student response body should contain name: "Student" age: 10 Given I have a valid subscription Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent default version to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 0 And the student response body should contain name: "Student" age: 10 @@ -130,7 +130,7 @@ Feature: Generating APK conf for gRPC API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I make grpc request GetStudent to "default.gw.wso2.com" with port 9095 And the gRPC response status code should be 0 And the student response body should contain name: "Student" age: 10 diff --git a/test/cucumber-tests/src/test/resources/tests/api/GlobalInterceptor.feature b/test/cucumber-tests/src/test/resources/tests/api/GlobalInterceptor.feature index 41bff9d905..a34a1c6009 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/GlobalInterceptor.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/GlobalInterceptor.feature @@ -9,7 +9,7 @@ Feature: API Deployment with Global Interceptor And the response body should contain "579ba27a1e03e2fdf099d1b6745e265f2d495606" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/globalinterceptor/1.0.0/get" with body "" Then the response status code should be 200 And the response body should contain "\"Gw-Header\": \"GW-header-value\"" diff --git a/test/cucumber-tests/src/test/resources/tests/api/GraphQL.feature b/test/cucumber-tests/src/test/resources/tests/api/GraphQL.feature index ea144361a5..9a5578b3b7 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/GraphQL.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/GraphQL.feature @@ -13,14 +13,14 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | | 500 | And the response body should contain "\"name\":\"string\"" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | @@ -41,7 +41,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 403 response code, not accepting | 429 | @@ -49,7 +49,7 @@ Feature: Generating APK conf for GraphQL API Given I have a valid subscription with scopes | wso2 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | @@ -69,7 +69,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | @@ -95,7 +95,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.0.0" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | @@ -125,7 +125,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting @@ -147,7 +147,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 401 response code, not accepting | 200 | @@ -168,7 +168,7 @@ Feature: Generating APK conf for GraphQL API And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting @@ -176,7 +176,7 @@ Feature: Generating APK conf for GraphQL API | 500 | And the response body should contain "\"name\":\"string\"" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 200 response code, not accepting | 429 | @@ -184,7 +184,7 @@ Feature: Generating APK conf for GraphQL API And the response body should contain "\"name\":\"string\"" And I have a valid token with a client certificate "invalid-cert.txt" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "POST" request to "https://default.gw.wso2.com:9095/graphql/3.14" with body "{\"query\":\"{ allHumans { name } }\"}" And I eventually receive 401 response code, not accepting diff --git a/test/cucumber-tests/src/test/resources/tests/api/HeaderModifier.feature b/test/cucumber-tests/src/test/resources/tests/api/HeaderModifier.feature index 75a9ee0705..fa4a5b5868 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/HeaderModifier.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/HeaderModifier.feature @@ -7,7 +7,7 @@ Feature: Test HTTPRoute Filter Header Modifier functionality And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/header-modifier-filters/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | @@ -33,7 +33,7 @@ Feature: Test HTTPRoute Filter Header Modifier functionality And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/header-modifier-filters/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/Interceptor.feature b/test/cucumber-tests/src/test/resources/tests/api/Interceptor.feature index 27e5a37fb6..c142d67992 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/Interceptor.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/Interceptor.feature @@ -9,7 +9,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 And the response body should not contain "\"Interceptor-Header\"" @@ -20,7 +20,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 And the response body should contain "\"Interceptor-Header\": \"Interceptor-header-value\"" @@ -31,7 +31,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 Then the response headers contains key "interceptor-response-header" and value "Interceptor-Response-header-value" @@ -43,7 +43,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 Then the response headers contains key "interceptor-response-header" and value "Interceptor-Response-header-value" @@ -55,7 +55,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 Then the response headers contains key "interceptor-response-header" and value "Interceptor-Response-header-value" @@ -67,7 +67,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 Then the response headers contains key "interceptor-response-header" and value "Interceptor-Response-header-value" @@ -79,7 +79,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" Then the response status code should be 200 Then the response headers contains key "interceptor-response-header" and value "Interceptor-Response-header-value" @@ -91,7 +91,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" And the response body should contain "\"Interceptor-Header\": \"Interceptor-header-value\"" Then the response status code should be 200 @@ -103,7 +103,7 @@ Feature: API Deployment with Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" And the response body should contain "\"Interceptor-Header\": \"Interceptor-header-value\"" Then the response status code should be 200 diff --git a/test/cucumber-tests/src/test/resources/tests/api/JWT.feature b/test/cucumber-tests/src/test/resources/tests/api/JWT.feature index 81988e17a2..255f256a0c 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/JWT.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/JWT.feature @@ -7,13 +7,13 @@ Feature: Test JWT related functionalities And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| |401| Then I set headers - |Authorization|bearer invalidToken| + |Authorization|Bearer invalidToken| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And the response status code should be 401 Then I remove header "Authorization" @@ -25,19 +25,19 @@ Feature: Test JWT related functionalities Given The system is ready Then I generate JWT token from idp1 with kid "123-456" Then I set headers - |Authorization|bearer ${idp-1-token}| + |Authorization|Bearer ${idp-1-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| |401| Then I set headers - |Authorization|bearer "${idp-1-token}h"| + |Authorization|Bearer "${idp-1-token}h"| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |429| |200| Then I set headers - |Authorization|bearer ${idp-1-token}| + |Authorization|Bearer ${idp-1-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -48,7 +48,7 @@ Feature: Test JWT related functionalities |429| |401| Then I set headers - |Authorization|bearer ${idp-1-token}| + |Authorization|Bearer ${idp-1-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |429| @@ -61,7 +61,7 @@ Feature: Test JWT related functionalities And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer invalidToken| + |Authorization|Bearer invalidToken| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-disabled/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -75,13 +75,13 @@ Feature: Test JWT related functionalities And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-custom-header/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |429| |200| Then I set headers - |testAuth|bearer ${accessToken}| + |testAuth|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-custom-header/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -100,13 +100,13 @@ Feature: Test JWT related functionalities And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-custom-header-resource/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |429| |200| Then I set headers - |testAuth|bearer ${accessToken}| + |testAuth|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-custom-header-resource/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Mandatory.feature b/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Mandatory.feature index 6cd8fb4fe5..d796aa60a1 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Mandatory.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Mandatory.feature @@ -8,7 +8,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting @@ -28,7 +28,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting @@ -48,7 +48,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -68,7 +68,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting @@ -107,7 +107,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -127,12 +127,12 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -157,13 +157,13 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | @@ -173,7 +173,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And I eventually receive 200 response code, not accepting | 401 | Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -193,7 +193,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | @@ -272,12 +272,12 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -297,21 +297,21 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | And I have a valid token with a client certificate "config-map-2.txt" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | And I have a valid token with a client certificate "config-map-3.txt" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting @@ -331,21 +331,21 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | And I have a valid token with a client certificate "config-map-2.txt" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | And I have a valid token with a client certificate "config-map-3.txt" Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting diff --git a/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Optional.feature b/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Optional.feature index e17fd60308..a4c25caabb 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Optional.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/MTLSwithOAuth2Optional.feature @@ -8,7 +8,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting @@ -32,7 +32,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting @@ -43,7 +43,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And I eventually receive 401 response code, not accepting | 200 | Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -62,7 +62,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -82,7 +82,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | @@ -107,7 +107,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he Then the response status code should be 200 Then I set headers | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | - | Authorization | bearer {accessToken} | + | Authorization | Bearer {accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -132,7 +132,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he | 200 | Then I set headers | X-WSO2-CLIENT-CERTIFICATE | ${clientCertificate} | - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | @@ -151,7 +151,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer invalidToken | + | Authorization | Bearer invalidToken | And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting | 200 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/MultiEnvironment.feature b/test/cucumber-tests/src/test/resources/tests/api/MultiEnvironment.feature index 7c49dd524b..a3e85b2206 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/MultiEnvironment.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/MultiEnvironment.feature @@ -7,7 +7,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/withoutenv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -22,7 +22,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request for organization "org3" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org3}| + |Authorization|Bearer ${org3}| And I send "GET" request to "https://org3.gw.wso2.com:9095/withoutenv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -37,7 +37,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request for organization "org4" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org4}| + |Authorization|Bearer ${org4}| And I send "GET" request to "https://org4.gw.wso2.com:9095/withoutenv/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |200| @@ -52,7 +52,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default-dev.gw.wso2.com:9095/multienv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -61,7 +61,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default-qa.gw.wso2.com:9095/multienv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| @@ -78,7 +78,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request for organization "org3" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org3}| + |Authorization|Bearer ${org3}| And I send "GET" request to "https://org3-qa.gw.wso2.com:9095/multienv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |401| @@ -93,7 +93,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request for organization "org4" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org4}| + |Authorization|Bearer ${org4}| And I send "GET" request to "https://org4-qa.gw.wso2.com:9095/multienv/3.14/employee/" with body "" And I eventually receive 401 response code, not accepting |200| @@ -108,7 +108,7 @@ Feature: Deploy APIs in multiple environments And make the API deployment request for organization "org4" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org4}| + |Authorization|Bearer ${org4}| And I send "GET" request to "https://org4-dev.gw.wso2.com:9095/multienv/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |401| diff --git a/test/cucumber-tests/src/test/resources/tests/api/OrganizationBasedAPIS.feature b/test/cucumber-tests/src/test/resources/tests/api/OrganizationBasedAPIS.feature index 973ec45068..aaefb83424 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/OrganizationBasedAPIS.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/OrganizationBasedAPIS.feature @@ -12,36 +12,36 @@ Feature: Organization Base API Deployment And make the API deployment request for organization "org2" Then the response status code should be 200 Then I set headers - |Authorization|bearer ${org1}| + |Authorization|Bearer ${org1}| And I send "GET" request to "https://org1.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| Then I set headers - |Authorization|bearer ${org2}| + |Authorization|Bearer ${org2}| And I send "GET" request to "https://org2.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| When I undeploy the API whose ID is "432bf873bf751ad714ddc635b0a4d9d194b39eb3" and organization "org1" Then the response status code should be 202 Then I set headers - |Authorization|bearer ${org1}| + |Authorization|Bearer ${org1}| And I send "GET" request to "https://org1.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 404 response code, not accepting |429| Then I set headers - |Authorization|bearer ${org2}| + |Authorization|Bearer ${org2}| And I send "GET" request to "https://org2.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| When I undeploy the API whose ID is "d45e79bec8c4b2d3a7543e09530e0a995ea68691" and organization "org2" Then the response status code should be 202 Then I set headers - |Authorization|bearer ${org1}| + |Authorization|Bearer ${org1}| And I send "GET" request to "https://org1.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 404 response code, not accepting |429| Then I set headers - |Authorization|bearer ${org2}| + |Authorization|Bearer ${org2}| And I send "GET" request to "https://org2.gw.wso2.com:9095/test/3.14/employee/" with body "" And I eventually receive 404 response code, not accepting |429| \ No newline at end of file diff --git a/test/cucumber-tests/src/test/resources/tests/api/RequestMirror.feature b/test/cucumber-tests/src/test/resources/tests/api/RequestMirror.feature index 3dfe4f6af3..7f427adab3 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/RequestMirror.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/RequestMirror.feature @@ -7,7 +7,7 @@ Feature: Test HTTPRoute Filter Request Mirror functionality And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/request-mirror-filter/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting | 401 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/RequestRedirect.feature b/test/cucumber-tests/src/test/resources/tests/api/RequestRedirect.feature index 28570f428d..f93f2b2944 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/RequestRedirect.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/RequestRedirect.feature @@ -7,7 +7,7 @@ Feature: Test HTTPRoute Filter Request Redirect functionality And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/request-redirect-filter/3.14/employee/" with body "" And I eventually receive 301 response code, not accepting | 401 | @@ -29,7 +29,7 @@ Feature: Test HTTPRoute Filter Request Redirect functionality And make the API deployment request Then the response status code should be 200 Then I set headers - | Authorization | bearer ${accessToken} | + | Authorization | Bearer ${accessToken} | And I send "GET" request to "https://default.gw.wso2.com:9095/request-redirect-filter/3.14/employee/" with body "" And I eventually receive 301 response code, not accepting | 401 | diff --git a/test/cucumber-tests/src/test/resources/tests/api/RevokedToken.feature b/test/cucumber-tests/src/test/resources/tests/api/RevokedToken.feature index b4c1adc3a4..521a81d36d 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/RevokedToken.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/RevokedToken.feature @@ -7,7 +7,7 @@ Feature: Token revocation And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/jwt-basic/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/SemanticVersioning.feature b/test/cucumber-tests/src/test/resources/tests/api/SemanticVersioning.feature index 6aa4ca1d2a..475a8f6ada 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/SemanticVersioning.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/SemanticVersioning.feature @@ -9,7 +9,7 @@ Feature: Semantic Versioning Based Intelligent Routing Then the response status code should be 200 Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120005" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/sem-api/v1.0/employee/" with body "" Then the response status code should be 200 @@ -73,7 +73,7 @@ Feature: Semantic Versioning Based Intelligent Routing Then the response status code should be 200 Then I generate JWT token from idp1 with kid "123-456" and consumer_key "45f1c5c8-a92e-11ed-afa1-0242ac120005" Then I set headers - |Authorization|bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| + |Authorization|Bearer ${idp-1-45f1c5c8-a92e-11ed-afa1-0242ac120005-token}| And I send "GET" request to "https://default.gw.wso2.com:9095/sem-api/v1/employee/" with body "" Then the response status code should be 200 And the response body should contain "\"version\":\"v1.5\"" diff --git a/test/cucumber-tests/src/test/resources/tests/api/SimpleRateLimit.feature b/test/cucumber-tests/src/test/resources/tests/api/SimpleRateLimit.feature index 7b88660c50..e391e51c84 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/SimpleRateLimit.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/SimpleRateLimit.feature @@ -7,7 +7,7 @@ Feature: Test simple rate limit feature And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I wait for next minute And I send "GET" request to "https://default.gw.wso2.com:9095/simple-rl/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting @@ -43,7 +43,7 @@ Feature: Test simple rate limit feature And make the API deployment request Then the response status code should be 200 Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "POST" request to "https://default.gw.wso2.com:9095/simple-rl-r/3.14/employee/" with body "" And I eventually receive 200 response code, not accepting |429| diff --git a/test/cucumber-tests/src/test/resources/tests/api/resourceInterceptor.feature b/test/cucumber-tests/src/test/resources/tests/api/resourceInterceptor.feature index 93271f5287..fa751d4046 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/resourceInterceptor.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/resourceInterceptor.feature @@ -9,13 +9,13 @@ Feature: API Deployment with Resource Interceptor And the response body should contain "547961eeaafed989119c45ffc13f8b87bfda821d" And I wait for 1 minute Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/get" with body "" And the response body should not contain "\"Interceptor-Header\"" Then the response status code should be 200 Then the response headers not contains key "interceptor-response-header" Then I set headers - |Authorization|bearer ${accessToken}| + |Authorization|Bearer ${accessToken}| And I send "GET" request to "https://default.gw.wso2.com:9095/interceptor/1.0.0/headers" with body "" And the response body should contain |"Interceptor-Header": "Interceptor-header-value"| diff --git a/test/integration/integration/utils/http/helpers.go b/test/integration/integration/utils/http/helpers.go index 54b8853d6b..a6f09fbb53 100644 --- a/test/integration/integration/utils/http/helpers.go +++ b/test/integration/integration/utils/http/helpers.go @@ -21,12 +21,12 @@ import ( "fmt" ) -// AddBearerTokenToHeader adds a bearer token to the request. +// AddBearerTokenToHeader adds a Bearer token to the request. func AddBearerTokenToHeader(token string, headers map[string]string) map[string]string { return AddCustomBearerTokenHeader("Authorization", token, headers) } -// AddCustomBearerTokenHeader adds a bearer token to the request with specified auth header name. +// AddCustomBearerTokenHeader adds a Bearer token to the request with specified auth header name. func AddCustomBearerTokenHeader(headerName string, token string, headers map[string]string) map[string]string { if headers == nil { headers = make(map[string]string) diff --git a/test/performance/README.md b/test/performance/README.md index 25d84d6865..751c3c9be1 100644 --- a/test/performance/README.md +++ b/test/performance/README.md @@ -162,7 +162,7 @@ Add the extracted IP to `/etc/hosts` and map it to `default.gw.wso2.com` hostnam Execute the following command to make a test request to APK using a previously generated access token: ```bash -curl -k "https://default.gw.wso2.com:9095/test-definition-default/3.14/employee" --header "Authorization: bearer $access_token" -d "{"sds":"dsdsd"}" -X POST +curl -k "https://default.gw.wso2.com:9095/test-definition-default/3.14/employee" --header "Authorization: Bearer $access_token" -d "{"sds":"dsdsd"}" -X POST ``` ### Start JMeter Slave Servers