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

feat(storage): easier mocks with ObjectMetadata #9899

Merged

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Sep 22, 2022

Recapitulates the changes to make BucketMetadata easier to mock. This change adds modifiers for all the fields in ObjectMetadata and removes the need for internal::CommonMetadata<>.

Since internal::CommonMetadata<> is not needed, I deprecated the class, removed all references to the class or its header file, and refactor any useful code out of its header file.

This is part of the work for #7142 and for #8929


This change is Reviewable

Recapitulates the changes to make `BucketMetadata` easier to mock. This
change adds modifiers for all the fields in `ObjectMetadata` and removes
the need for `internal::CommonMetadata<>`.

Since `internal::CommonMetadata<>` is not needed, I deprecated the
class, removed all references to the class or its header file, and
refactor any useful code out of its header file.
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Sep 22, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 842f1324cdcdb1b74d130a101473c083abe397d0

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Base: 94.19% // Head: 94.20% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (842f132) compared to base (5efef78).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #9899    +/-   ##
========================================
  Coverage   94.19%   94.20%            
========================================
  Files        1495     1494     -1     
  Lines      140024   140166   +142     
========================================
+ Hits       131896   132043   +147     
+ Misses       8128     8123     -5     
Impacted Files Coverage Δ
google/cloud/storage/bucket_metadata.h 99.18% <ø> (ø)
...gle/cloud/storage/internal/access_control_common.h 100.00% <ø> (ø)
...e/cloud/storage/internal/bucket_metadata_parser.cc 98.36% <ø> (ø)
...le/cloud/storage/internal/lifecycle_rule_parser.cc 100.00% <ø> (ø)
...d/storage/internal/object_access_control_parser.cc 100.00% <ø> (ø)
google/cloud/storage/object_access_control.h 100.00% <ø> (ø)
...ud/storage/internal/grpc_object_metadata_parser.cc 97.27% <100.00%> (+0.07%) ⬆️
...e/cloud/storage/internal/object_metadata_parser.cc 98.78% <100.00%> (+1.60%) ⬆️
google/cloud/storage/object_metadata.cc 99.39% <100.00%> (+0.04%) ⬆️
google/cloud/storage/object_metadata.h 100.00% <100.00%> (ø)
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan coryan marked this pull request as ready for review September 22, 2022 15:59
@coryan coryan requested a review from a team as a code owner September 22, 2022 15:59
Copy link
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 17 of 17 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @coryan)

@coryan coryan merged commit 0056c2f into googleapis:main Sep 22, 2022
@coryan coryan deleted the feat-storage-easier-mocks-with-object-metadata branch September 22, 2022 17:20
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants