Allow users to mock functions returning storage::*Metadata values. #3042
Labels
api: storage
Issues related to the Cloud Storage API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
For "good reasons" the
storage::*Metadata
classes do not have constructors or accessors that can set every field. Many of these classes have fields that are read-only, that is, setting the fields in aUpdate
orPatch
request is always an error.The only way to initialize these values is through the functions to convert a string in the JSON object format into
storage::*Metadata
object. But these functions live in theinternal::
namespace, and applications should not be calling functions in theinternal::
namespace, not even for mocks.Maybe we can create functions in a
storage_mocks
namespace, which at least would make it obvious that they are (a) not for general use, and (b) part of our public APIs that we intend to support.The text was updated successfully, but these errors were encountered: