Skip to content

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