mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +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:
@@ -49,7 +49,7 @@ func TestSet(t *testing.T) {
|
||||
if err != nil || resp.Node == nil {
|
||||
t.Fatalf("unexpected error: %v %v", err, resp)
|
||||
}
|
||||
decoded, err := testapi.Default.Codec().Decode([]byte(resp.Node.Value))
|
||||
decoded, err := runtime.Decode(testapi.Default.Codec(), []byte(resp.Node.Value))
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected response: %#v", resp.Node)
|
||||
}
|
||||
@@ -67,7 +67,7 @@ func TestGet(t *testing.T) {
|
||||
ctx := context.TODO()
|
||||
framework.WithEtcdKey(func(key string) {
|
||||
testObject := api.ServiceAccount{ObjectMeta: api.ObjectMeta{Name: "foo"}}
|
||||
coded, err := testapi.Default.Codec().Encode(&testObject)
|
||||
coded, err := runtime.Encode(testapi.Default.Codec(), &testObject)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user