const resetFieldsNamespace … var resetFieldsStatusData … const resetFieldsStatusDefault … var resetFieldsSkippedResources … var noConflicts … var image2 … var resetFieldsSpecData … // TestResetFields makes sure that fieldManager does not own fields reset by the storage strategy. // It takes 2 objects obj1 and obj2 that differ by one field in the spec and one field in the status. // It applies obj1 to the spec endpoint and obj2 to the status endpoint, the lack of conflicts // confirms that the fieldmanager1 is wiped of the status and fieldmanager2 is wiped of the spec. // We then attempt to apply obj2 to the spec endpoint which fails with an expected conflict. func TestApplyResetFields(t *testing.T) { … } func expectConflict(objRet *unstructured.Unstructured, err error, dynamicClient dynamic.Interface, resource schema.GroupVersionResource, namespace, name string) error { … }