Commit Graph

21 Commits (43b644ea6f54d113bd72d94f928647419e7e0804)

Author SHA1 Message Date
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Clayton Coleman efe88e0818 Update client library to react to changes in Decoding 2016-01-22 13:27:24 -05:00
k8s-merge-robot 03ecde1277 Merge pull request #17535 from mesosphere/jdef_abspath_breaks_proxies
Auto commit by PR queue bot
2016-01-20 21:46:47 -08:00
James DeFelice 75f487f7bf AbsPath should be compatible with proxy-prefixes:
- replace Config.Prefix with .Host and .APIPath
- Request .path promoted to .pathPrefix, .baseURL holds required prefix
2016-01-20 00:31:58 +00:00
David Oppenheimer 8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Daniel Martí 91fbff99dc Properly close test http servers in unversioned
If not, using `go test -count=n` would make them pile up and ultimately
get to the limit of open files:

	client_test.go:522: expected an error, got Get http://127.0.0.1:46070/api: dial tcp 127.0.0.1:46070: socket: too many open files

Steps to reproduce (no longer fails):

	godep go test -short -run '^$' -o test .
	./test -test.run '^TestGetSwaggerSchema' -test.count 100

Note that this might not fail if your `ulimit -n` is not low enough.
2016-01-08 00:10:54 +01:00
Chao Xu f2edba3bec remove ServerAPIVersions from client
hard-code the groupVersion in SetKubernetesDefaults
2015-12-16 16:24:55 -08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Kris e2583e294d Cleaning up test organization for impending move
I'm moving/deleting some tests to make an upcoming RESTClient refactor
PR cleaner.

 - TestDoRequestBearer is redundant to
   pkg/client/transport.TestBearerAuthRoundTripper
 - Added a case to pkg/client/transport.TestBasicAuthRoundTripper to
   cover what TestDoRequestWithoutPassword was testing
 - Moved TestSetsCodec, TestRESTClientRequires,
   TestValidateHostParameter to helper_test.go since they were really
   testing helper functions and not the RESTClient directly.
 - Modified TestValidateHostParameter during the moved to just use
   DefaultServerURL instead of creating a client.
2015-12-04 14:21:06 -08:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
Kris 9b75b88d4e Move client's tranport to a separate package 2015-11-19 14:55:47 -08:00
Chao Xu 15e6ca5ac5 rename to GroupVersion and rename the one in type.go to GroupVersionForDiscovery 2015-11-05 14:52:58 -08:00
Chao Xu 7817c2312c fix rebase 2015-10-12 13:48:14 -07:00
Chao Xu 6a4c477af7 add a ServerAPIVersions function that visits both /api and /apis, and doesn't require a high-level client 2015-10-01 15:00:33 -07:00
Chao Xu ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu 64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Kris Rousey 7ba5b058cc Moving client libs to unversioned dir 2015-08-18 10:03:19 -07:00