• Dan Mace's avatar
    Fix Unstructured field accessor · 547d8205
    Dan Mace authored
    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.
    547d8205
Name
Last commit
Last update
..
BUILD Loading commit data...
api_meta_help_test.go Loading commit data...
api_meta_meta_test.go Loading commit data...
api_meta_scheme_test.go Loading commit data...
apis_meta_v1_unstructed_unstructure_test.go Loading commit data...
doc.go Loading commit data...
runtime_helper_test.go Loading commit data...
runtime_serializer_protobuf_protobuf_test.go Loading commit data...
runtime_unversioned_test.go Loading commit data...
watch_until_test.go Loading commit data...