-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agent integration tests for ratelimit and Interceptor services
- Loading branch information
Showing
16 changed files
with
1,443 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
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
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
122 changes: 122 additions & 0 deletions
122
...cucumber-tests/src/test/resources/artifacts/payloads/api_policy/request_and_response.json
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,122 @@ | ||
{ | ||
"name": "EmployeeAPI", | ||
"context": "/api-policy", | ||
"version": "3.14", | ||
"type": "HTTP", | ||
"audience": null, | ||
"transport": ["http", "https"], | ||
"policies": ["Unlimited, Gold"], | ||
"authorizationHeader": "Authorization", | ||
"apiKeyHeader": "ApiKey", | ||
"securityScheme": ["oauth_basic_auth_api_key_mandatory", "oauth2"], | ||
"apiPolicies": { | ||
"request": [ | ||
{ | ||
"policyName": "addLogMessage", | ||
"policyId": "e64c0cf0-8df0-4659-a299-099d390de6d0", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
}, | ||
{ | ||
"policyName": "jsonValidator", | ||
"policyId": "f11983f9-6429-415f-880a-b407192f137f", | ||
"policyVersion": "v1", | ||
"parameters": { | ||
"maxPropertyCount": "100", | ||
"maxStringLength": "100", | ||
"maxArrayElementCount": "100", | ||
"maxKeyLength": "100", | ||
"maxJsonDepth": "100", | ||
"requestMessageBufferSize": "1024", | ||
"jsonSchemaValidator": "org.wso2.carbon.apimgt.gateway.mediators.JsonSchemaValidator" | ||
} | ||
} | ||
], | ||
"response": [ | ||
{ | ||
"policyName": "addLogMessage", | ||
"policyId": "e64c0cf0-8df0-4659-a299-099d390de6d0", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
} | ||
], | ||
"fault": [ | ||
{ | ||
"policyName": "jsonFault", | ||
"policyId": "cba00e78-34a3-4380-8a76-766b99147f18", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
} | ||
] | ||
}, | ||
"endpointConfig": { | ||
"endpoint_type": "http", | ||
"sandbox_endpoints": {"url": "http://backend:80/anything"}, | ||
"production_endpoints": {"url": "http://backend:80/anything"} | ||
}, | ||
"endpointImplementationType": "ENDPOINT", | ||
"operations": [ | ||
{ | ||
"id": "", | ||
"target": "/employee", | ||
"verb": "GET", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "10KPerMin", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee", | ||
"verb": "POST", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "20KPerMin", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee/{employeeId}", | ||
"verb": "PUT", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "Unlimited", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee/{employeeId}", | ||
"verb": "DELETE", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "Unlimited", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
} | ||
], | ||
"gatewayVendor": "wso2", | ||
"gatewayType":"wso2/apk" | ||
} |
122 changes: 122 additions & 0 deletions
122
...src/test/resources/artifacts/payloads/api_policy/request_interceptor_param_variation.json
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,122 @@ | ||
{ | ||
"name": "EmployeeAPI", | ||
"context": "/api-policy", | ||
"version": "3.14", | ||
"type": "HTTP", | ||
"audience": null, | ||
"transport": ["http", "https"], | ||
"policies": ["Unlimited, Gold"], | ||
"authorizationHeader": "Authorization", | ||
"apiKeyHeader": "ApiKey", | ||
"securityScheme": ["oauth_basic_auth_api_key_mandatory", "oauth2"], | ||
"apiPolicies": { | ||
"request": [ | ||
{ | ||
"policyName": "addLogMessage", | ||
"policyId": "e64c0cf0-8df0-4659-a299-099d390de6d0", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
}, | ||
{ | ||
"policyName": "jsonValidator", | ||
"policyId": "f11983f9-6429-415f-880a-b407192f137f", | ||
"policyVersion": "v1", | ||
"parameters": { | ||
"maxPropertyCount": "100", | ||
"maxStringLength": "100", | ||
"maxArrayElementCount": "100", | ||
"maxKeyLength": "100", | ||
"maxJsonDepth": "100", | ||
"requestMessageBufferSize": "1024", | ||
"jsonSchemaValidator": "org.wso2.carbon.apimgt.gateway.mediators.JsonSchemaValidator" | ||
} | ||
} | ||
], | ||
"response": [ | ||
{ | ||
"policyName": "addLogMessage", | ||
"policyId": "e64c0cf0-8df0-4659-a299-099d390de6d0", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
} | ||
], | ||
"fault": [ | ||
{ | ||
"policyName": "jsonFault", | ||
"policyId": "cba00e78-34a3-4380-8a76-766b99147f18", | ||
"policyVersion": "v1", | ||
"parameters": {} | ||
} | ||
] | ||
}, | ||
"endpointConfig": { | ||
"endpoint_type": "http", | ||
"sandbox_endpoints": {"url": "http://backend:80/anything"}, | ||
"production_endpoints": {"url": "http://backend:80/anything"} | ||
}, | ||
"endpointImplementationType": "ENDPOINT", | ||
"operations": [ | ||
{ | ||
"id": "", | ||
"target": "/employee", | ||
"verb": "GET", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "10KPerMin", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee", | ||
"verb": "POST", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "20KPerMin", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee/{employeeId}", | ||
"verb": "PUT", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "Unlimited", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
}, | ||
{ | ||
"id": "", | ||
"target": "/employee/{employeeId}", | ||
"verb": "DELETE", | ||
"authType": "Application & Application User", | ||
"throttlingPolicy": "Unlimited", | ||
"scopes": [], | ||
"usedProductIds": [], | ||
"amznResourceName": null, | ||
"amznResourceTimeout": null, | ||
"amznResourceContentEncode": null, | ||
"payloadSchema": null, | ||
"uriMapping": null, | ||
"operationPolicies": {"request": [], "response": [], "fault": []} | ||
} | ||
], | ||
"gatewayVendor": "wso2", | ||
"gatewayType":"wso2/apk" | ||
} |
Oops, something went wrong.