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

Doesn't assert number value #260

Closed
rabestro opened this issue Feb 21, 2024 · 1 comment
Closed

Doesn't assert number value #260

rabestro opened this issue Feb 21, 2024 · 1 comment

Comments

@rabestro
Copy link

The request file:

{{host}}/actuator/health

?? status == 200
?? body status == UP
?? body components.diskSpace.status == UP
?? body components.diskSpace.details.total > 0
?? body components.diskSpace.details.free > 0

Error message

✖: components.diskSpace.details.total > 0 (AssertionError [ERR_ASSERTION]: components.diskSpace.details.total (36671356928) > 0 - /Users/jegors/.vscode/extensions/anweber.vscode-httpyac-6.11.4/dist/extension.js:191:46440)
✖: components.diskSpace.details.free > 0 (AssertionError [ERR_ASSERTION]: components.diskSpace.details.free (17609199616) > 0 - /Users/jegors/.vscode/extensions/anweber.vscode-httpyac-6.11.4/dist/extension.js:191:46440)

@AnWeber
Copy link
Owner

AnWeber commented Feb 24, 2024

A standard mistake that I unfortunately always make. 0 is falsy and I had a check to see if the value was present. Please simply change the check to > 1 until the bugfix is released

{{host}}/actuator/health

?? status == 200
?? body status == UP
?? body components.diskSpace.status == UP
?? body components.diskSpace.details.total > 1
?? body components.diskSpace.details.free > 1

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

No branches or pull requests

2 participants