Commit Graph

11 Commits

Author SHA1 Message Date
Taylor Blau
44ac3a9b3a api{client,lifecycle}: use config.Endpoint to resolve root 2016-05-25 13:31:12 -06:00
Taylor Blau
ecdba8d8bd api: un-vendor dependencies 2016-05-24 09:29:58 -06:00
Taylor Blau
a71d5f7181 api/client: minor touch-ups to documentation 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
Taylor Blau
4593d0a641 vendor: vendor dependencies in vendor/ using Glide
- script/vendor received an update in order to work with Glide
- import paths have been rewritten to work with GO15VENDOREXPERIMENT
2016-05-23 12:10:35 -06:00
Steve Streeting
c23f3ebd8e Refactor new(Batch)ApiRequest into api pkg 2016-05-17 11:52:56 +01:00
Steve Streeting
3298d9bbb3 Refactored many api functions to httputil/api package from lfs
Also moved ntlm to httputil since too http-specific to be contained in auth
2016-05-16 17:57:37 +01:00
Steve Streeting
c4bbd3724e Major refactor to pull things into config, httputil, tools
Mainly required to avoid cyclical dependencies when separating other things
2016-05-13 17:38:06 +01:00