-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check circuit breaker config dump values
- Loading branch information
1 parent
2e6fa28
commit 4eb2647
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
test/cucumber-tests/src/test/resources/artifacts/apk-confs/circuit-breaker-config-dump.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: "CircuitBreakerConfigDump" | ||
context: "/circuit-breaker-config-dump" | ||
id: "circuit-breaker-config-dump" | ||
version: "3.14" | ||
type: "REST" | ||
defaultVersion: false | ||
endpointConfigurations: | ||
production: | ||
endpoint: "http://backend:80" | ||
resiliency: | ||
timeout: | ||
downstreamRequestIdleTimeout: 50 | ||
upstreamResponseTimeout: 30 | ||
circuitBreaker: | ||
maxConnectionPools: 1115 | ||
maxConnections: 1111 | ||
maxPendingRequests: 1112 | ||
maxRequests: 1113 | ||
maxRetries: 1114 | ||
operations: | ||
- target: "/get" | ||
verb: "GET" | ||
authTypeEnabled: true | ||
scopes: [ ] | ||
- target: "/anything/{path}" | ||
verb: "GET" | ||
authTypeEnabled: true | ||
scopes: [ ] | ||
- target: "/delay/{delay}" | ||
verb: "GET" | ||
authTypeEnabled: true | ||
scopes: [ ] | ||
- target: "/delay/{delay}" | ||
verb: "POST" | ||
authTypeEnabled: true | ||
scopes: [ ] | ||
- target: "/delay/{delay}" | ||
verb: "PUT" | ||
authTypeEnabled: true | ||
scopes: [ ] | ||
authentication: | ||
- authType: JWT | ||
enabled: true | ||
sendTokenToUpstream: true | ||
headerName: Authorization | ||
headerEnable: true |
26 changes: 26 additions & 0 deletions
26
test/cucumber-tests/src/test/resources/tests/api/CircuitBreakerEnvoyConfigDump.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Feature: circuitBreakerMaxRequest | ||
Scenario: Testing backend timeout | ||
Given The system is ready | ||
And I have a valid subscription | ||
When I use the APK Conf file "artifacts/apk-confs/circuit-breaker-config-dump.yaml" | ||
And the definition file "artifacts/definitions/employees_api.json" | ||
And make the API deployment request | ||
Then the response status code should be 200 | ||
Then I wait for 5 seconds | ||
And I send "GET" request to "http://default.gw.wso2.com:9000/config_dump" with body "" | ||
Then the response status code should be 200 | ||
And the response body should contain "\"max_connections\": 1111" | ||
And the response body should contain "\"max_pending_requests\": 1112" | ||
And the response body should contain "\"max_requests\": 1113" | ||
And the response body should contain "\"max_retries\": 1114" | ||
And the response body should contain "\"max_connection_pools\": 1115" | ||
|
||
Scenario Outline: Undeploy API | ||
Given The system is ready | ||
And I have a valid subscription | ||
When I undeploy the API whose ID is "<apiID>" | ||
Then the response status code should be <expectedStatusCode> | ||
|
||
Examples: | ||
| apiID | expectedStatusCode | | ||
| circuit-breaker-config-dump | 202 | |