Rename ID -> Name
This commit is contained in:
@@ -48,10 +48,10 @@ func TestEmbeddedObject(t *testing.T) {
|
||||
s.AddKnownTypeWithName("v1test", "EmbeddedTest", &EmbeddedTestExternal{})
|
||||
|
||||
outer := &EmbeddedTest{
|
||||
TypeMeta: runtime.TypeMeta{ID: "outer"},
|
||||
TypeMeta: runtime.TypeMeta{Name: "outer"},
|
||||
Object: runtime.EmbeddedObject{
|
||||
&EmbeddedTest{
|
||||
TypeMeta: runtime.TypeMeta{ID: "inner"},
|
||||
TypeMeta: runtime.TypeMeta{Name: "inner"},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func TestEmbeddedObject(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected decode error %v", err)
|
||||
}
|
||||
if externalViaJSON.Kind == "" || externalViaJSON.APIVersion == "" || externalViaJSON.ID != "outer" {
|
||||
if externalViaJSON.Kind == "" || externalViaJSON.APIVersion == "" || externalViaJSON.Name != "outer" {
|
||||
t.Errorf("Expected objects to have type info set, got %#v", externalViaJSON)
|
||||
}
|
||||
if !reflect.DeepEqual(externalViaJSON.EmptyObject.RawJSON, []byte("null")) || len(externalViaJSON.Object.RawJSON) == 0 {
|
||||
|
Reference in New Issue
Block a user