mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
This commit is contained in:
@@ -113,13 +113,13 @@ func TestControllerDecode(t *testing.T) {
|
||||
ID: "foo",
|
||||
},
|
||||
}
|
||||
body, err := runtime.DefaultCodec.Encode(controller)
|
||||
body, err := latest.Codec.Encode(controller)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
controllerOut := storage.New()
|
||||
if err := runtime.DefaultCodec.DecodeInto(body, controllerOut); err != nil {
|
||||
if err := latest.Codec.DecodeInto(body, controllerOut); err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user