-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
466cfb2
commit 2c67571
Showing
2 changed files
with
57 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 |
---|---|---|
@@ -1 +1,56 @@ | ||
# krkn-service-hijacking | ||
# Service Hijacking Mock Webservice | ||
|
||
This is the mock webservice used in the [Krkn](https://github.com/krkn-chaos/krkn) Service Hijacking | ||
scenario. | ||
This webservice, based on [Flask](https://flask.palletsprojects.com/en/3.0.x/) dinamycally loads a time-based test plan | ||
with the following syntax: | ||
|
||
```yaml | ||
- resource: /list/index.php | ||
steps: | ||
GET: | ||
- duration: 15 | ||
status: 500 | ||
mime_type: application/json | ||
payload: | | ||
{ | ||
"status":"internal server error" | ||
} | ||
- duration: 15 | ||
status: 201 | ||
mime_type: application/json | ||
payload: | | ||
{ | ||
"status":"resource created" | ||
} | ||
POST: | ||
- duration: 15 | ||
status: 401 | ||
mime_type: application/json | ||
payload: | | ||
{ | ||
"status": "unauthorized" | ||
} | ||
- duration: 15 | ||
status: 404 | ||
mime_type: text/plain | ||
payload: not found | ||
- resource: /patch | ||
steps: | ||
PATCH: | ||
- duration: 15 | ||
status: 201 | ||
mime_type: text/plain | ||
payload: resource patched | ||
- duration: 15 | ||
status: 400 | ||
mime_type: text/plain | ||
payload: bad request | ||
|
||
``` | ||
|
||
the webservice loads two environment variables: | ||
- `TEST_PLAN_PATH`: (mandatory) is the path in the filesystem where the test plan is located. Krkn mounts it to | ||
the pod deployed using a `ConfigMap` | ||
- `STATS_ROUTE`: (optional, default `/krkn-stats`) overrides the default route of resource that prints the chaos run statistics | ||
in case of a conflict with the test plan |
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