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

Return early when result is empty in verify_value #19

Closed
wants to merge 1 commit into from

Conversation

elliott-davis
Copy link

When the result is empty in an assertion, verify_value returns 0, which causes the test to succeed when it should fail. The test I used for this was

run verify "'status' is 'running' for pods named 'app'"

When that pod doesn't exist prior to this change, the test would succeed.

When the result is empty in an assertion, `verify_value` returns 0, which causes the test to succeed when it should fail. The test I used for this was 
``` 
run verify "'status' is 'running' for pods named 'app'"
```

When that pod doesn't exist prior to this change, the test would succeed.
@vincent-zurczak
Copy link
Member

Thank you for this contribution.
Sorry, I missed the notification and I had not been there for some time.

Could you also add a test that was failing before this addition?

@vincent-zurczak
Copy link
Member

Actually, I have checked your patch and it breaks some tests.
I have reviewed the way assertions work when there is no expected count. I am about to commit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants