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

fix(pubsub): install admin mocks #13537

Merged
merged 1 commit into from Jan 31, 2024

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Jan 31, 2024

Part of the work for #5782

We were copying all of the mock files into both include/google/cloud/pubsub/mocks and include/google/cloud/pubsub/admin/mocks, without preserving the relative directory structure.

The handwritten and generated admin mock files have the same name, so I think we would first install the generated admin mocks (because they were first in the list), then we would overwrite them with the handwritten admin mocks.

Before:

docker:fedora-latest-cmake$ ls /h/google-cloud-cpp-installed/include/google/cloud/pubsub/mocks
mock_ack_handler.h		      mock_publisher_connection.h  mock_subscriber_connection.h
mock_blocking_publisher_connection.h  mock_pull_ack_handler.h	   mock_subscription_admin_connection.h
mock_exactly_once_ack_handler.h       mock_schema_connection.h	   mock_topic_admin_connection.h
docker:fedora-latest-cmake$ head -1 /h/google-cloud-cpp-installed/include/google/cloud/pubsub/mocks/mock_topic_admin_connection.h 
// Copyright 2020 Google LLC

docker:fedora-latest-cmake$ ls /h/google-cloud-cpp-installed/include/google/cloud/pubsub/admin/mocks
mock_ack_handler.h		      mock_publisher_connection.h  mock_subscriber_connection.h
mock_blocking_publisher_connection.h  mock_pull_ack_handler.h	   mock_subscription_admin_connection.h
mock_exactly_once_ack_handler.h       mock_schema_connection.h	   mock_topic_admin_connection.h
docker:fedora-latest-cmake$ head -1 /h/google-cloud-cpp-installed/include/google/cloud/pubsub/admin/mocks/mock_topic_admin_connection.h 
// Copyright 2020 Google LLC

After:

docker:fedora-latest-cmake$ ls /h/google-cloud-cpp-installed/include/google/cloud/pubsub/mocks
mock_ack_handler.h		      mock_publisher_connection.h  mock_subscriber_connection.h
mock_blocking_publisher_connection.h  mock_pull_ack_handler.h	   mock_subscription_admin_connection.h
mock_exactly_once_ack_handler.h       mock_schema_connection.h	   mock_topic_admin_connection.h
docker:fedora-latest-cmake$ head -1 /h/google-cloud-cpp-installed/include/google/cloud/pubsub/mocks/mock_topic_admin_connection.h 
// Copyright 2020 Google LLC

docker:fedora-latest-cmake$ ls /h/google-cloud-cpp-installed/include/google/cloud/pubsub/admin/mocks
mock_subscription_admin_connection.h  mock_topic_admin_connection.h
docker:fedora-latest-cmake$ head -1 /h/google-cloud-cpp-installed/include/google/cloud/pubsub/admin/mocks/mock_topic_admin_connection.h 
// Copyright 2023 Google LLC

Note that we are going to need to use the $<BUILD_INTERFACE:...> generator expression in order to install our other mocks too.


This change is Reviewable

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Jan 31, 2024
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (115a348) 93.14% compared to head (9b20939) 93.14%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13537   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files        2192     2192           
  Lines      190738   190738           
=======================================
+ Hits       177660   177663    +3     
+ Misses      13078    13075    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbolduc dbolduc marked this pull request as ready for review January 31, 2024 18:53
@dbolduc dbolduc requested a review from a team as a code owner January 31, 2024 18:53
@dbolduc dbolduc merged commit 94355b0 into googleapis:main Jan 31, 2024
60 checks passed
@dbolduc dbolduc deleted the install-pubsub-admin-mocks branch January 31, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants