-
-
Notifications
You must be signed in to change notification settings - Fork 89
Validate SCSI error codes (sense key, ASC) in unit tests #895
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Currently the unit tests only validate whether scsi_exception is raised where expected. It is not yet validated whether the sense key and ASC have the expected values. The missing validation shall be added.
Example:
EXPECT_THAT([&printer]() { printer->Dispatch(scsi_command::eCmdPrint); }, Throws<scsi_exception>(AllOf(
Property(&scsi_exception::get_sense_key, sense_key::ILLEGAL_REQUEST),
Property(&scsi_exception::get_asc, asc::INVALID_FIELD_IN_CDB))))
<< "Buffer overflow was not reported";
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers