k3s/pkg/apimachinery/tests
Dan Mace 547d820588 Fix Unstructured field accessor
Fix the Unstructured GetDeletionGracePeriodSeconds accessor which was
always returning nil regardless of the underlying stored value. The
field value always appearing nil prevents Custom Resource instances
from being deleted when garbage collection is enabled for CRs and
when DeletePropagationOrphan is used. More generally, this fix means that
delete-on-update now works for CR instances.

Add some test coverage for Unstructured metadata deserialization.

The Unstructured DeletionGracePeriodSeconds field marshals as a value
type from JSON and as a pointer type via SetDeletionGracePeriodSeconds.
The GetDeletionGracePeriodSeconds method now supports handling both
int64 and *int64 values so that either underlying value can be returned.

Add a reflection-based unit test which attempts to exercise all the
Object Get/Set methods for nil handling.
2017-06-28 13:44:29 -04:00
..
BUILD run hack/update-all 2017-06-22 11:31:03 -07:00
api_meta_help_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
api_meta_meta_test.go API 2017-02-28 23:05:40 -08:00
api_meta_scheme_test.go
apis_meta_v1_unstructed_unstructure_test.go Fix Unstructured field accessor 2017-06-28 13:44:29 -04:00
doc.go
runtime_helper_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
runtime_serializer_protobuf_protobuf_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
runtime_unversioned_test.go
watch_until_test.go