Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added chaos experiments #58

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Geertvdc
Copy link
Contributor

@Geertvdc Geertvdc commented Mar 11, 2022

Added new functionality to perform chaos engineering like experiments on the mocks by adding Prefer headers.

You can send different status code or add latency to the response by adding the statusCode and/or latency parameters inside the prefer header. Using the statusCodeRate and latencyRate parameters you can specify when to add these behaviours. Use a value between 0 and 100 (%) to add less or more randomness.

An example:

GET http://localhost:5001/v1/pets/1
Prefer: statusCode=500, statusCodeRate=50
Prefer: latency=500, latencyRate=50

Pair programmed with @mivano, @NielsNijveldt, @dtiemstra

@Geertvdc
Copy link
Contributor Author

@jormaechea is this something you could review?

@jormaechea
Copy link
Owner

@Geertvdc thanks for the PR. It looks like a really good idea. Sadly I'm traveling without access to my computer so I won't be able to review this at least until end of March.

I’ll let you know as soon as I can take a look at it.

@jormaechea jormaechea added the enhancement New feature or request label Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants