opencontainers / distribution-spec

OCI Distribution Specification
https://opencontainers.org
Apache License 2.0
792 stars 199 forks source link

conformance: check response status before checking location #420

Closed rogpeppe closed 1 year ago

rogpeppe commented 1 year ago

I noticed that when these tests are running against a server that returns the wrong status code (an error, for example), the failure that we see doesn't mention the status code, but only that the returned location is empty.

This change checks the status code first, as if that's wrong, the location is very unlikely to be relevant.