-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add local proxy server to simulate throttling
- Loading branch information
Showing
2 changed files
with
54 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
39 changes: 39 additions & 0 deletions
39
mockServer/simulateBucketNotFoundDuringMultipartUpload.jsonc
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,39 @@ | ||
// To use this configuration make sure it is selected as MOCKSERVER_INITIALIZATION_JSON_PATH and switch rokku to go through proxy port: 1080 | ||
// Remember to disable `updateBucketCredentials` so rokku will try to refetch bucket location before each request and to enable rokku multiple namespace feature | ||
[ | ||
{ | ||
// Allow first few requests to start multipart upload | ||
"httpRequest": { | ||
"method": "GET" | ||
}, | ||
"httpForward": { | ||
"host": "host.docker.internal", | ||
"port": 8010, | ||
"scheme": "HTTP" | ||
}, | ||
"times": { | ||
"remainingTimes": 4, | ||
"unlimited": false | ||
}, | ||
"priority": 20, | ||
}, | ||
{ | ||
// Simulate rate limiting | ||
"httpRequest": { | ||
"method": "GET" | ||
}, | ||
"httpResponse": { | ||
"statusCode": 503, | ||
}, | ||
"priority": 10, | ||
}, | ||
{ | ||
// allow all other requests | ||
"httpForward": { | ||
"host": "host.docker.internal", | ||
"port": 8010, | ||
"scheme": "HTTP" | ||
}, | ||
"priority": 0, | ||
}, | ||
] |