Compare commits

..

2 Commits

Author SHA1 Message Date
5ac9007a18 Update outage requests to PATCH 2023-09-08 16:04:01 -04:00
72ff3612d4 Update README.md 2023-09-08 16:03:49 -04:00
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,9 @@ The API is created and served using [Mockoon](https://mockoon.com). Latency,
timeouts, and outages are introduced at random with
[Toxiproxy](https://github.com/Shopify/toxiproxy).
If you wish to add your own toxics while the stack is running, the Toxiproxy
HTTP API is available at http://localhost:8474.
## Requirements
- Docker Compose

View File

@ -50,7 +50,7 @@ disable_latency() {
enable_outage() {
if (( OUTAGE_ENABLED == 0 )); then
echo "enabling outage..."
curl -s -X POST http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{
curl -s -X PATCH http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{
"enabled": false
}' > /dev/null
OUTAGE_ENABLED=1
@ -60,7 +60,7 @@ enable_outage() {
disable_outage() {
if (( OUTAGE_ENABLED == 1 )); then
echo "disabling outage..."
curl -s -X POST http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{
curl -s -X PATCH http://toxiproxy:8474/proxies/$SERVICE_NAME -d'{
"enabled": true
}' > /dev/null
OUTAGE_ENABLED=0