-
Notifications
You must be signed in to change notification settings - Fork 681
Allow the negate formating for cmp #6862
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
Conversation
✅ Deploy Preview for chef-inspec canceled.
|
|
Hello Taknok! Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
|
I allow myself to send a message to up the topic as there was no comment since the beginning and 2 month passed. |
|
Should I drop this PR ? Is this an unwanted feature ? |
Vasu1105
left a comment
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.
Thanks @Taknok and sorry for delay in reply. LGTM. Could you please rebase the branch and fix the lint failures and add unit test if possible around this?
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
|
@Taknok This PR also missing DCO sign off please follow the Details https://github.com/chef/chef/blob/main/CONTRIBUTING.md#developer-certification-of-origin-dco and do the needful. |
|
Push force: The linting commit has also the DCO now. |
Vasu1105
left a comment
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. Thanks @Taknok.
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
* Linting
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
* Linting
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Pg <pg.developper.fr@gmail.com>
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
* Linting
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>


Description
The 'cmp' matcher when used with a negation as 'should_not' has a confusion formating when control fails:

This, because the 'format_actual' always pass 'false' to the 'format_expectation'. Thus the 'format_expectation' never reach the 'negate_str'.
When passing the negate value to the 'format_expectation' the output is more intuitive:

Types of changes
Checklist: