Commit Graph

15 Commits

Author SHA1 Message Date
Steve Streeting
e5c37c8093 Document nil behaviour of NewHttpLifecycle 2016-12-06 10:06:14 +00:00
Steve Streeting
7d835d5851 HttpLifecycle really depends on Configuration not just EndpointAccess 2016-12-05 11:15:36 +00:00
risk danger olson
8773193ca0 update other github/git-lfs references 2016-11-15 10:07:11 -07:00
risk danger olson
bba8f3b876 update package imports 2016-11-15 10:01:18 -07:00
risk danger olson
b9c5a108d9 replace config.Config references in httputil 2016-07-21 18:07:23 -06:00
risk danger olson
2aa05699f1 remove config.Config references in auth pkg 2016-07-21 17:13:05 -06:00
Taylor Blau
ee9701171c api/http_lifecycle: add a note about handling HTTP errors 2016-06-03 09:22:19 -06:00
Taylor Blau
44ac3a9b3a api{client,lifecycle}: use config.Endpoint to resolve root 2016-05-25 13:31:12 -06:00
Taylor Blau
b5cfb3efc8 api/http_lifecycle: use httputil.DoHttpRequestWithRedirects() 2016-05-24 09:27:18 -06:00
Taylor Blau
f6a01371a9 api/http_lifecycle: use httputil's client, update tests 2016-05-24 09:27:18 -06:00
Taylor Blau
c7f2cd0211 api/http_lifecycle: make internal methods, add an ASK for @sinbad 2016-05-24 09:27:17 -06:00
Taylor Blau
c282983235 api/schema: initial take on MethodTestCase
The initial thought here is to introduce a MethodTestCase type that
encapsulates the behavior of testing a single method in a particular given
service.

To do so, a httptest.Server is created and the schema is turned into a request
which is fired at that server. Thet MethodTestCase, of course, knows how to
respond to different requests, and the behavior of those responses is tested.

What I dislike is that we have to write three things which are mostly the same
to test any endpoint in any case on the API:
  1) a request type (Go struct)
  2) an expected response type (Go type)
  3) the actual response (a mutltline Go string, which is really just JSON)

This seems redundant, so I may explore other options for implementing this sort
of thing in the future.
2016-05-24 09:27:15 -06:00
Taylor Blau
9234838551 api/http_lifecycle: test HttpLifecycle implementation 2016-05-24 09:27:15 -06:00
Taylor Blau
ff2a96b09d api/response: HttpResponse tests 2016-05-24 09:27:15 -06:00
Taylor Blau
91c1b2d360 api: introduce client, lifecycle and response types
- rename client to v1, v2_client to client
2016-05-24 09:27:14 -06:00