DMTF / Redfish-Protocol-Validator

The Redfish Protocol Validator tests the HTTP protocol behavior of a Redfish service to validate that it conforms to the Redfish specification.
Other
14 stars 12 forks source link

Request for guidance on assertion REQ_DATA_MOD_ERRORS #67

Closed leoprovido closed 10 months ago

leoprovido commented 11 months ago

Hi @mraineri ,

I would like to request for some guidance on assertion REQ_DATA_MOD_ERRORS. This particular assertion currently return as "NOT_TESTED" with a message "No failed POST responses found; unable to test this assertion".

I would like to setup/prepare the system under test such that this assertion be evaluated as either Test passed or Test failed given the for loop within test_data_mod_errors in service_requests.py.

Can you recommend an approach to do this?

Thanks

mraineri commented 11 months ago

Typically the tool uses the session collection and manager account collection to test POST operations since they're very reliably supported. It also uses a dummy account set up by the tool to test PATCH operations.

So, for your system, does it support /redfish/v1/AccountService/Accounts and /redfish/v1/SessionService/Sessions? As long as you support those URIs (and PATCH on /redfish/v1/AccountService/Accounts/{AccountId}), you'll be at a good starting point for those tests to run.

leoprovido commented 10 months ago

Thanks, @mraineri.

Yes, my system supports /redfish/v1/AccountService/Accounts and /redfish/v1/SessionService/Sessions. Yes, my system supports PATCH on /redfish/v1/AccountService/Accounts/{AccountId}.

In terms of POST operations, I see POST requests returned with 4XX but for /redfish/v1/EventService/Subscriptions and /redfish/v1/SessionService/Sessions. I expected them to be detected by REQ_DATA_MOD_ERRORS. Am I right in this line of thinking?

I will check whether the assertions that have POST requests returned with 4XX are before or after REQ_DATA_MOD_ERRORS.

mraineri commented 10 months ago

For those cases, it's specifically looking for any failure other than a 405 (405 is special cased since it indicates that POST isn't allowed, so it's not like other failures where the user is providing bad data). So, it would be good to look to see what the specific 4XX status is from your service.

leoprovido commented 10 months ago

Thank you. We know what to do from here. Cheers