-
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.
Merge pull request #185 from ing-bank/fix/check-bucket-location-rate-…
…limiting Fix/check bucket location rate limiting
- Loading branch information
Showing
6 changed files
with
68 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3" | ||
services: | ||
|
||
mockServer: | ||
image: mockserver/mockserver:5.14.0 | ||
ports: | ||
- 1080:1080 | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
environment: | ||
MOCKSERVER_WATCH_INITIALIZATION_JSON: "true" | ||
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/simulateBucketNotFoundDuringMultipartUpload.jsonc | ||
genericJVMOptions: "-Xmx1024m -Xms512m" | ||
volumes: | ||
- type: bind | ||
source: ./mockServer | ||
target: /config |
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 comment out `updateBucketCredentials` in `NamespacesHandler.scala:52` 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, | ||
}, | ||
] |
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