-
Couldn't load subscription status.
- Fork 45
Support multi-values (expect_one_of) in jsonpath tolerance expect #191
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
base: master
Are you sure you want to change the base?
Conversation
ad70586 to
2e4ef91
Compare
|
@Lawouach I did a mistake, thought to use At last, I used another |
|
Hello, for a better review, could you please squahs your commits and force push? |
2e4ef91 to
5e7ce91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @saravanan30erd I appreciate the effort and thank you for the tests but I think this needs a bit more work.
The naming expect_alt is confusing to me, I don't understand what it does from its name.
Side note, could you add a changelog entry too? Also there will be a need for a spec PR too (on chaostoolkit-documentation). Maybe we should start there to clarify the goal?
|
Sure, I will raise the PR for documentation once the naming convention is finalized. |
|
I thought |
|
@Lawouach Renamed the new field as |
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
==========================================
- Coverage 88.02% 87.97% -0.05%
==========================================
Files 25 25
Lines 2113 2121 +8
==========================================
+ Hits 1860 1866 +6
- Misses 253 255 +2
Continue to review full report at Codecov.
|
Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> add debug log - jsonpath tolerance Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> add new field for expect alternative values Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> add debug log for expect_alt Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> add test cases for expect_alt Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> rename the second expect field & add changelog Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com>
e196962 to
4a99ba9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
But needs a couple of minor changes.
We'll also need to update the specification at https://docs.chaostoolkit.org/reference/api/experiment/#steady-state-probe-tolerance
c1dbff4 to
3976645
Compare
Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> changes based on feedback Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com> changes based on feedback Signed-off-by: saravanan palanisamy <saravanan30erd@gmail.com>
3976645 to
d7d5e20
Compare
|
@Lawouach Did changes based on your comments. Also added the information in documentation and raised PR. |
Added support for multi-values (expect_one_of) in jsonpath tolerance
expectfield.Example:
In this case, path
$.statusprovides value either["green"]or["yellow"]or["red"]. Bothyellowandgreenconsidered as healthy status. Example: In Elastic-search cluster, If you remove or shutdown one or two nodes in cluster, thestatuswill begreenbefore action andyellowafter action. But both should be considered as healthy state in ES.Currently it doesn't support
or/expect_one_offeature in expect value.so added support for
expect_one_offeature in expect value.If we want to validate the output against multiple expected values, then we can use
list of valuesinstead ofstring.