Addressed changes

This commit is contained in:
Brendan Burns 2015-08-31 21:11:34 -07:00
parent 855c7cedcc
commit d993b8891d
2 changed files with 10 additions and 2 deletions

View File

@ -107,7 +107,7 @@ func initThirdParty(t *testing.T) (*tools.FakeEtcdClient, *httptest.Server) {
Versions: []expapi.APIVersion{
{
APIGroup: "group",
Name: "v1",
Name: "v3",
},
},
}

View File

@ -98,7 +98,15 @@ func (t *thirdPartyResourceDataCodec) populate(objIn *expapi.ThirdPartyResourceD
if !ok {
return fmt.Errorf("unexpected object: %#v", obj)
}
if resourceVersion, ok := metadata["resourceVersion"]; ok {
resourceVersionStr, ok := resourceVersion.(string)
if !ok {
return fmt.Errorf("unexpected object: %v", metadata["resourceVersion"])
}
objIn.ResourceVersion = strconv.Atoi(resourceVersionStr)
}
objIn.Name = name
objIn.Data = data
return nil