Skip to content

Commit

Permalink
Merge pull request #2352 from O-sura/main
Browse files Browse the repository at this point in the history
Added debug logs and latency to the tests cases after the deployment request
  • Loading branch information
CrowleyRajapakse committed Apr 30, 2024
2 parents adf0943 + b84a92e commit 25e6f9d
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ public void iHaveValidGraphQLDefinition() throws Exception {
String multipartForm = new String(outputStream.toByteArray(), StandardCharsets.UTF_8);

// Log the multipart form
logger.info("Multipart Form Data:\n{}"+ multipartForm);
logger.info("Validator URL: " + Utils.getGQLSchemaValidatorURL());
logger.info("Publisher Token: " + sharedContext.getPublisherAccessToken());
logger.debug("Multipart Form Data:\n{}"+ multipartForm);
logger.debug("Validator URL: " + Utils.getGQLSchemaValidatorURL());
logger.debug("Publisher Token: " + sharedContext.getPublisherAccessToken());

HttpResponse response = sharedContext.getHttpClient().doPostWithMultipart(Utils.getGQLSchemaValidatorURL(),
multipartEntity, headers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: API Policy Addition(Interceptor Service)
And the response body should contain "IntercepterServiceAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -60,6 +61,7 @@ Feature: API Policy Addition(Interceptor Service)
And the response body should contain "IntercepterServiceAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -108,6 +110,7 @@ Feature: API Policy Addition(Interceptor Service)
And the response body should contain "ReqandResIntercepterServiceAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -157,6 +160,7 @@ Feature: API Policy Addition(Interceptor Service)
And the response body should contain "ParamVarIntercepterServiceAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Creating new versions of the APIs
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -75,6 +76,7 @@ Feature: Creating new versions of the APIs
And the response body should contain "StarWarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Backend Security for APIs
And I have a valid Devportal access token
And make the Application Creation request with the name "SampleApp"
Then the response status code should be 201
Then I wait for 40 seconds
And the response body should contain "SampleApp"
And I have a KeyManager
And make the Generate Keys request
Expand Down Expand Up @@ -63,6 +64,7 @@ Feature: Backend Security for APIs
And the response body should contain "StarWarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Backend Support for APIs
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -68,6 +69,7 @@ Feature: Backend Support for APIs
And the response body should contain "StarwarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: CORS Policy handling
And the response body should contain "test-cors"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -95,6 +96,7 @@ Feature: CORS Policy handling
And the response body should contain "StarWarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: API Default Version
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -59,6 +60,7 @@ Feature: API Default Version
When I use the Payload file "artifacts/payloads/gql_default_version.json"
Then I make the import GraphQLAPI Creation request
Then the response status code should be 201
Then I wait for 40 seconds
And the response body should contain "StarwarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: API Deployment
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -59,6 +60,7 @@ Feature: API Deployment
And the response body should contain "StarwarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Testing the internal-key generation and invocation
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
Then I make an internal key generation request
Expand Down Expand Up @@ -42,6 +43,7 @@ Feature: Testing the internal-key generation and invocation
And the response body should contain "StarwarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
Then I make an internal key generation request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -89,6 +90,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -142,6 +144,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -196,6 +199,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
Then I set headers
Expand Down Expand Up @@ -228,6 +232,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I set "invlaidToken" as the new access token
Expand Down Expand Up @@ -262,6 +267,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
# Then the response status code should be 201
# And make the API Revision Deployment request
# Then the response status code should be 201
# Then I wait for 40 seconds
# And make the Change Lifecycle request
# Then the response status code should be 200
# Then I set headers
Expand Down Expand Up @@ -295,6 +301,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
And the response body should contain "EmployeeServiceAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee" with body ""
Expand Down Expand Up @@ -325,6 +332,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -394,6 +402,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -71,6 +72,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -134,6 +136,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -186,6 +189,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -242,6 +246,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
Then I set "invalidToken" as the new access token
Expand Down Expand Up @@ -276,6 +281,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -333,6 +339,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
Then I set "invalidToken" as the new access token
Expand Down Expand Up @@ -365,6 +372,7 @@ Feature: Test mTLS between client and gateway with client certificate sent in he
Then the response status code should be 201
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I send "GET" request to "https://default.gw.wso2.com:9095/mtls/3.14/employee/" with body ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Testing Ratelimit feature
And the response body should contain "SimpleRateLimitAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -78,6 +79,7 @@ Feature: Testing Ratelimit feature
And the response body should contain "\"throttlingPolicy\":\"TestRatelimit\""
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -151,6 +153,7 @@ Feature: Testing Ratelimit feature
And the response body should contain "StarwarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: API Policy Addition(Interceptor Service)
Then the response status code should be 200
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Invoking APIs with scopes enabled
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down Expand Up @@ -63,6 +64,7 @@ Feature: Invoking APIs with scopes enabled
And the response body should contain "StarWarsAPI"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feature: Blocking the subscription for a selected application
And the response body should contain "SwaggerPetstore"
And make the API Revision Deployment request
Then the response status code should be 201
Then I wait for 40 seconds
And make the Change Lifecycle request
Then the response status code should be 200
And I have a valid Devportal access token
Expand Down
Loading

0 comments on commit 25e6f9d

Please sign in to comment.