-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update logs sent on groovy script error
- Loading branch information
Showing
6 changed files
with
263 additions
and
3 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
44 changes: 44 additions & 0 deletions
44
src/test/resources/apis/api-fail-execute-request-script.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,44 @@ | ||
{ | ||
"id": "api-fail-response-template", | ||
"name": "my-api", | ||
"gravitee": "2.0.0", | ||
"proxy": { | ||
"context_path": "/test", | ||
"endpoints": [ | ||
{ | ||
"name": "default", | ||
"target": "http://localhost:8080/team", | ||
"http": { | ||
"connectTimeout": 3000, | ||
"readTimeout": 60000 | ||
} | ||
} | ||
] | ||
}, | ||
"flows": [ | ||
{ | ||
"name": "flow-1", | ||
"methods": [ | ||
], | ||
"enabled": true, | ||
"path-operator": { | ||
"path": "/", | ||
"operator": "STARTS_WITH" | ||
}, | ||
"pre": [ | ||
{ | ||
"name": "Groovy", | ||
"description": "", | ||
"enabled": true, | ||
"policy": "groovy", | ||
"configuration": { | ||
"scope": "REQUEST", | ||
"onRequestScript": "def foo= nes azdazdaa();" | ||
} | ||
} | ||
], | ||
"post": [] | ||
} | ||
], | ||
"resources": [] | ||
} |
44 changes: 44 additions & 0 deletions
44
src/test/resources/apis/api-fail-execute-response-script.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,44 @@ | ||
{ | ||
"id": "api-fail-response-template", | ||
"name": "my-api", | ||
"gravitee": "2.0.0", | ||
"proxy": { | ||
"context_path": "/test", | ||
"endpoints": [ | ||
{ | ||
"name": "default", | ||
"target": "http://localhost:8080/team", | ||
"http": { | ||
"connectTimeout": 3000, | ||
"readTimeout": 60000 | ||
} | ||
} | ||
] | ||
}, | ||
"flows": [ | ||
{ | ||
"name": "flow-1", | ||
"methods": [ | ||
], | ||
"enabled": true, | ||
"path-operator": { | ||
"path": "/", | ||
"operator": "STARTS_WITH" | ||
}, | ||
"pre": [], | ||
"post": [ | ||
{ | ||
"name": "Groovy", | ||
"description": "", | ||
"enabled": true, | ||
"policy": "groovy", | ||
"configuration": { | ||
"scope": "RESPONSE", | ||
"onResponseScript": "def foo= azkcaznc();" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"resources": [] | ||
} |
44 changes: 44 additions & 0 deletions
44
src/test/resources/apis/api-fail-parse-request-content.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,44 @@ | ||
{ | ||
"id": "api-fail-response-template", | ||
"name": "my-api", | ||
"gravitee": "2.0.0", | ||
"proxy": { | ||
"context_path": "/test", | ||
"endpoints": [ | ||
{ | ||
"name": "default", | ||
"target": "http://localhost:8080/team", | ||
"http": { | ||
"connectTimeout": 3000, | ||
"readTimeout": 60000 | ||
} | ||
} | ||
] | ||
}, | ||
"flows": [ | ||
{ | ||
"name": "flow-1", | ||
"methods": [ | ||
], | ||
"enabled": true, | ||
"path-operator": { | ||
"path": "/", | ||
"operator": "STARTS_WITH" | ||
}, | ||
"pre": [ | ||
{ | ||
"name": "Groovy", | ||
"description": "", | ||
"enabled": true, | ||
"policy": "groovy", | ||
"configuration": { | ||
"scope": "REQUEST", | ||
"onRequestContentScript": "import groovy.json.JsonSlurper\nimport groovy.json.JsonOutput\n\ndef jsonSlurper = new JsonSlurper()\ndef content = jsonSlurper.parseText(response.content)\nreturn JsonOutput.toJson(content)" | ||
} | ||
} | ||
], | ||
"post": [] | ||
} | ||
], | ||
"resources": [] | ||
} |
44 changes: 44 additions & 0 deletions
44
src/test/resources/apis/api-fail-parse-response-content.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,44 @@ | ||
{ | ||
"id": "api-fail-response-template", | ||
"name": "my-api", | ||
"gravitee": "2.0.0", | ||
"proxy": { | ||
"context_path": "/test", | ||
"endpoints": [ | ||
{ | ||
"name": "default", | ||
"target": "http://localhost:8080/team", | ||
"http": { | ||
"connectTimeout": 3000, | ||
"readTimeout": 60000 | ||
} | ||
} | ||
] | ||
}, | ||
"flows": [ | ||
{ | ||
"name": "flow-1", | ||
"methods": [ | ||
], | ||
"enabled": true, | ||
"path-operator": { | ||
"path": "/", | ||
"operator": "STARTS_WITH" | ||
}, | ||
"pre": [], | ||
"post": [ | ||
{ | ||
"name": "Groovy", | ||
"description": "", | ||
"enabled": true, | ||
"policy": "groovy", | ||
"configuration": { | ||
"scope": "RESPONSE", | ||
"onResponseContentScript": "import groovy.json.JsonSlurper\nimport groovy.json.JsonOutput\n\ndef jsonSlurper = new JsonSlurper()\ndef content = jsonSlurper.parseText(response.content)\nreturn JsonOutput.toJson(content)" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"resources": [] | ||
} |