Remove vestiges of defaulting from conversion path, switch to top-level default registration only
This commit is contained in:
@@ -207,12 +207,17 @@ func TestResourceListConversion(t *testing.T) {
|
||||
|
||||
for i, test := range tests {
|
||||
output := api.ResourceList{}
|
||||
|
||||
// defaulting is a separate step from conversion that is applied when reading from the API or from etcd.
|
||||
// perform that step explicitly.
|
||||
v1.SetDefaults_ResourceList(&test.input)
|
||||
|
||||
err := api.Scheme.Convert(&test.input, &output, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error for case %d: %v", i, err)
|
||||
}
|
||||
if !apiequality.Semantic.DeepEqual(test.expected, output) {
|
||||
t.Errorf("unexpected conversion for case %d: Expected %+v; Got %+v", i, test.expected, output)
|
||||
t.Errorf("unexpected conversion for case %d: Expected\n%+v;\nGot\n%+v", i, test.expected, output)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user