This commit replaces the use of "sanity" with more inclusive
naming.
When `sanity` is used in a more general sense either `validity`
or `quick` is used.
had to make the comment in wrappers/services_test.go a one-liner
otherwise half of it is lost
last set of files needing changing (as per current master)
* they now can take a *doOptions uniformly to control timeout:
- nil or absence uses the defaults
- there's a predefined doNoTimeoutAndRetry to get no timeout
* there's a simple and a full parameter only variant of doSync and doAsync
* use rawWithTimeout in the places that were using raw but setting
a timeout via context themselves
This PR makes the error handling via xerrors in the "client"
package consistent. All errors from client.{doSync,raw} are
wrapped using %w from the xerrors package. Once this is
wrapped this is part of the API so tests were added to ensure
we don't regress here.
The daemon can query remote assertions from the store now. This
PR adds support for this to the client package via a new
KnownOptions parameter to the client.Known() call. This breaks
API which should be ok given that its a internal client API.
If this is a problem we can use #7573
Make sure that the timeout context spans over the reception of response body.
Otherwise, reading of response body may error out, if there is more data than
the default receive buffer.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
- replace http.Status* with well-known numeric values in tests
- store: replace http.Status* with well-known numeric values and dont' convert 401 into please buy, atm is just confusing
- replace http.Status* with well-known numeric values in retry checks
- replace http.Status* with well-known numeric values in fake services
- run-check static check
- replace http.Status* with well-known numeric values in client and daemon