Skip to content

Conversation

@inqrphl
Copy link
Contributor

@inqrphl inqrphl commented Jan 13, 2026

  • use error types and typecasting to see if no drives are found
  • write non-existent drive tests for check_drivesize for both linux and windows
  • also test customizing empty state result using empty-state= argument
  • corrected it so that the errors are ignored only when empty-state is set. if empty-state is set, it will ignore discovery errors, produce and empty list. As the empty-state is set, it override will function. If it unset, the default behavior is to raise an error due to an empty list being returned from a check

This PR replaces the old one #290

Ahmet Oeztuerk added 7 commits January 13, 2026 13:32
- use error types and typecasting to see if no drives are found
- return OK state if no drives are found
- write non-existent drive tests for check_drivesize
- also test customizing empty state result using empty-state= argument
- also report ok for windows partition not found errors
- add more tests for windows
fix the misunderstood condition about how drive/directory discovery
errors are handled. previously, if the drive was not found the errors
were always ignored, the check would not have any items in its list and
the empty-state override would function since the list is empty

corrected it so that the errors are ignored only when empty-state is
set. if empty-state is set, it will ignore discovery errors, produce and
empty list and the override will function. but if its not, it returns
the error just as before.
@sni sni merged commit 96e26ef into main Jan 14, 2026
133 checks passed
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.

3 participants