mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Initialize API servers with negotiated serializers
Pass down into the server initialization the necessary interface for handling client/server content type negotiation. Add integration tests for the negotiation.
This commit is contained in:
@@ -83,6 +83,7 @@ func setUp(t *testing.T) (Master, *etcdtesting.EtcdTestServer, Config, *assert.A
|
||||
func newMaster(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert.Assertions) {
|
||||
_, etcdserver, config, assert := setUp(t)
|
||||
|
||||
config.Serializer = api.Codecs
|
||||
config.KubeletClient = client.FakeKubeletClient{}
|
||||
|
||||
config.ProxyDialer = func(network, addr string) (net.Conn, error) { return nil, nil }
|
||||
@@ -496,7 +497,6 @@ func decodeResponse(resp *http.Response, obj interface{}) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(data, obj); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user