-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
104 additions
and
18 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
File renamed without changes.
34 changes: 34 additions & 0 deletions
34
test/cucumber-tests/src/test/resources/artifacts/apk-confs/request-redirect-filter.apk-conf
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,34 @@ | ||
--- | ||
id: "api-with-request-redirect-filter" | ||
name: "EmployeeServiceAPI" | ||
basePath: "/request-redirect-filter" | ||
version: "3.14" | ||
type: "REST" | ||
defaultVersion: false | ||
endpointConfigurations: | ||
production: | ||
endpoint: "http://backend:80/anything" | ||
operations: | ||
- target: "/employee" | ||
verb: "GET" | ||
secured: false | ||
scopes: [] | ||
operationPolicies: | ||
request: | ||
- policyName: RequestRedirect | ||
policyVersion: v1 | ||
parameters: | ||
url: "http://backend:80/anything" | ||
statusCode: 301 | ||
- target: "/employee" | ||
verb: "POST" | ||
secured: true | ||
scopes: [] | ||
- target: "/employee/{employeeId}" | ||
verb: "PUT" | ||
secured: true | ||
scopes: [] | ||
- target: "/employee/{employeeId}" | ||
verb: "DELETE" | ||
secured: true | ||
scopes: [] |
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
test/cucumber-tests/src/test/resources/tests/api/RequestRedirect.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,21 @@ | ||
Feature: Test HTTPRoute Filter Request Redirect functionality | ||
Scenario: Test request redirect functionality | ||
Given The system is ready | ||
And I have a valid subscription | ||
When I use the APK Conf file "artifacts/apk-confs/request-redirect-filter.apk-conf" | ||
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 set headers | ||
| 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 | | ||
|
||
Scenario: Undeploy the API | ||
Given The system is ready | ||
And I have a valid subscription | ||
When I undeploy the API whose ID is "api-with-request-redirect-filter" | ||
Then the response status code should be 202 | ||
|
||
|