mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-08 00:01:40 +00:00
make Registry use Encode
This commit is contained in:
@@ -16,7 +16,6 @@ limitations under the License.
|
||||
package registry
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -102,12 +101,10 @@ func TestExtractJson(t *testing.T) {
|
||||
ID: "foo",
|
||||
},
|
||||
}
|
||||
body, err := json.Marshal(pod)
|
||||
body, err := api.Encode(&pod)
|
||||
expectNoError(t, err)
|
||||
podOut, err := storage.Extract(body)
|
||||
expectNoError(t, err)
|
||||
// Extract adds in a kind
|
||||
pod.Kind = "cluster#pod"
|
||||
if !reflect.DeepEqual(pod, podOut) {
|
||||
t.Errorf("Expected %#v, found %#v", pod, podOut)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user