Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to mock functions returning storage::*Metadata values. #3042

Closed
coryan opened this issue Sep 9, 2019 · 1 comment
Closed

Allow users to mock functions returning storage::*Metadata values. #3042

coryan opened this issue Sep 9, 2019 · 1 comment
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@coryan
Copy link
Contributor

coryan commented Sep 9, 2019

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 a Update or Patch 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 the internal:: namespace, and applications should not be calling functions in the internal:: 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.

@coryan coryan added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 9, 2019
@devjgm
Copy link
Contributor

devjgm commented Dec 9, 2021

To be fixed as part of #7142

@devjgm devjgm closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants