diff --git a/google/cloud/storage/google_cloud_cpp_storage.cmake b/google/cloud/storage/google_cloud_cpp_storage.cmake index 5e53e972a990..d475554d4573 100644 --- a/google/cloud/storage/google_cloud_cpp_storage.cmake +++ b/google/cloud/storage/google_cloud_cpp_storage.cmake @@ -406,7 +406,6 @@ if (BUILD_TESTING) testing/client_unit_test.cc testing/client_unit_test.h testing/constants.h - testing/mock_client.cc testing/mock_client.h testing/mock_http_request.cc testing/mock_http_request.h diff --git a/google/cloud/storage/storage_client_testing.bzl b/google/cloud/storage/storage_client_testing.bzl index 5727e9f9a90f..e060351a27fa 100644 --- a/google/cloud/storage/storage_client_testing.bzl +++ b/google/cloud/storage/storage_client_testing.bzl @@ -35,7 +35,6 @@ storage_client_testing_hdrs = [ storage_client_testing_srcs = [ "testing/client_unit_test.cc", - "testing/mock_client.cc", "testing/mock_http_request.cc", "testing/object_integration_test.cc", "testing/random_names.cc", diff --git a/google/cloud/storage/testing/mock_client.cc b/google/cloud/storage/testing/mock_client.cc deleted file mode 100644 index 88cd26aba3f3..000000000000 --- a/google/cloud/storage/testing/mock_client.cc +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/testing/mock_client.h" - -namespace google { -namespace cloud { -namespace storage { -namespace testing { - -Client UndecoratedClientFromMock(std::shared_ptr mock) { - return internal::ClientImplDetails::CreateWithoutDecorations(std::move(mock)); -} - -} // namespace testing -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/testing/mock_client.h b/google/cloud/storage/testing/mock_client.h index 6a763d82c63f..657beeca1402 100644 --- a/google/cloud/storage/testing/mock_client.h +++ b/google/cloud/storage/testing/mock_client.h @@ -203,7 +203,9 @@ Client ClientFromMock(std::shared_ptr const& mock, * * This client does not retry on transient errors. */ -Client UndecoratedClientFromMock(std::shared_ptr mock); +inline Client UndecoratedClientFromMock(std::shared_ptr mock) { + return internal::ClientImplDetails::CreateWithoutDecorations(std::move(mock)); +} } // namespace testing } // namespace storage