snclient icon indicating copy to clipboard operation
snclient copied to clipboard

Check_drivesize : Non-empty drives return OK state instead of UNKNOWN

Open inqrphl opened this issue 1 month ago • 2 comments

  • add error types to the helper functions of check_drivesize
  • 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

inqrphl avatar Nov 19 '25 12:11 inqrphl

I only tested it on Linux. Is this behavior expected from Windows as well?

This checks Implemented field is set to ALL. On windows it uses the definitions made in check_drivesize_windows.go file. I can also add these error types to Windows helper functions as well.

inqrphl avatar Nov 19 '25 12:11 inqrphl

Is this behavior expected from Windows as well?

Yes please, this check should behave the same way across all supported platforms.

sni avatar Nov 19 '25 13:11 sni