Commit Graph

3 Commits

Author SHA1 Message Date
Preben Ingvaldsen
880bbf81af lfsapi: add Access param to DoWithAuth()
Add a new Access parameter to DoWithAuth() to allow callers to
specify the URL Access Mode. This removes the assumption that
DoWithAuth() will always be used for an LFS API request. This
commit also adds DoAPIRequestWithAuth(), which provides the
functionality of DoWithAuth() while explicitly using the LFS API
endpoint for the access mode, allowing parity with the previous
DoWithAuth() functionality.
2018-09-28 14:16:55 -07:00
brian m. carlson
47f70aec2e t: avoid panic in lfstest-customadapter
The custom adapter test binary wraps the HTTP API client and returns
various responses from the HTTP response to the custom transfer adapter.
This code assumes that if an error occurs, we will always have a valid
HTTP response object, but this is not the case.  If we lack such an
object, we will get a nil pointer dereference, a panic, and a segfault
in the client, causing the test to fail.

While it's currently unknown how to reproduce this issue, it has been
seen on the CI servers.  In order to improve the reliability of the
test, check to see if the response object is non-nil before
dereferencing it and produce a different but distinct error code if it
is nil.
2018-09-13 23:24:51 +00:00
Taylor Blau
7b1420243e test: move to 'test' to 't'
By default, the prove(1) program looks for tests to run in the 't'
directory at the repository root, so let's put existing tests there in
order to remove a non-default argument from prove.
2018-07-09 16:07:32 -05:00