-
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.
Add test case for CORS Policy generation from APKConf
- Loading branch information
1 parent
9a81440
commit 7463a0b
Showing
3 changed files
with
85 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
29 changes: 29 additions & 0 deletions
29
runtime/config-deployer-service/ballerina/tests/resources/API_CORS.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,29 @@ | ||
--- | ||
organization: "wso2" | ||
name: "test-cors" | ||
context: "/test_cors" | ||
version: "2.0.0" | ||
type: "REST" | ||
endpointConfigurations: | ||
production: | ||
endpoint: "https://httpbin.org" | ||
operations: | ||
- target: "/anything" | ||
verb: "GET" | ||
authTypeEnabled: true | ||
scopes: [] | ||
vhosts: | ||
production: ["gw.am.wso2.com"] | ||
sandbox: [] | ||
corsConfiguration: | ||
corsConfigurationEnabled: true | ||
accessControlAllowOrigins: | ||
- "wso2.com" | ||
accessControlAllowCredentials: true | ||
accessControlAllowHeaders: | ||
- "Content-Type" | ||
- "Authorization" | ||
accessControlAllowMethods: | ||
- "GET" | ||
accessControlAllowMaxAge: 3600 | ||
|
27 changes: 27 additions & 0 deletions
27
runtime/config-deployer-service/ballerina/tests/resources/api_cors.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,27 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: test-cors | ||
description: 'A simple HTTP Request & Response Service.<br/> <br/> <b>Run locally: | ||
</b> <code>$ docker run -p 80:80 kennethreitz/httpbin</code>' | ||
contact: | ||
url: https://kennethreitz.org | ||
email: [email protected] | ||
version: 2.0.0 | ||
servers: | ||
- url: https://httpbin.org | ||
tags: | ||
- name: HTTP Methods | ||
description: Testing different HTTP verbs | ||
- name: Auth | ||
description: Auth methods | ||
paths: | ||
/anything: | ||
get: | ||
tags: | ||
- Anything | ||
summary: Returns anything passed in request data. | ||
responses: | ||
200: | ||
description: Anything passed in request | ||
content: {} | ||
components: {} |