pkg/api: move HasObjectMetaSystemFieldValues into apimachinery
This commit is contained in:
@@ -49,11 +49,11 @@ func TestFillObjectMetaSystemFields(t *testing.T) {
|
||||
func TestHasObjectMetaSystemFieldValues(t *testing.T) {
|
||||
ctx := genericapirequest.NewDefaultContext()
|
||||
resource := metav1.ObjectMeta{}
|
||||
if api.HasObjectMetaSystemFieldValues(&resource) {
|
||||
if metav1.HasObjectMetaSystemFieldValues(&resource) {
|
||||
t.Errorf("the resource does not have all fields yet populated, but incorrectly reports it does")
|
||||
}
|
||||
FillObjectMetaSystemFields(ctx, &resource)
|
||||
if !api.HasObjectMetaSystemFieldValues(&resource) {
|
||||
if !metav1.HasObjectMetaSystemFieldValues(&resource) {
|
||||
t.Errorf("the resource does have all fields populated, but incorrectly reports it does not")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ func (t *Tester) testCreateHasMetadata(valid runtime.Object) {
|
||||
t.Fatalf("Unexpected object from result: %#v", obj)
|
||||
}
|
||||
defer t.delete(t.TestContext(), obj)
|
||||
if !api.HasObjectMetaSystemFieldValues(objectMeta) {
|
||||
if !metav1.HasObjectMetaSystemFieldValues(objectMeta) {
|
||||
t.Errorf("storage did not populate object meta field values")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user