mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 13:15:36 +00:00
Set GVK when decoding protobuf
This commit is contained in:
@@ -40,7 +40,7 @@ import (
|
||||
)
|
||||
|
||||
func TestUniversalDeserializer(t *testing.T) {
|
||||
expected := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test"}}
|
||||
expected := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test"}, TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Pod"}}
|
||||
d := legacyscheme.Codecs.UniversalDeserializer()
|
||||
for _, mediaType := range []string{"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"} {
|
||||
info, ok := runtime.SerializerInfoForMediaType(legacyscheme.Codecs.SupportedMediaTypes(), mediaType)
|
||||
|
Reference in New Issue
Block a user