Class MockConfigServiceV2Connection (2.20.0)

A class to mock ConfigServiceV2Connection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ConfigServiceV2Client. To do so, construct an object of type ConfigServiceV2Client with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See Also

This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
Type Description
Options

virtual ListBuckets(google::logging::v2::ListBucketsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::ListBucketsRequest
Returns
Type Description
StreamRange< google::logging::v2::LogBucket >

virtual GetBucket(google::logging::v2::GetBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetBucketRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

virtual CreateBucketAsync(google::logging::v2::CreateBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateBucketRequest const &
Returns
Type Description
future< StatusOr< google::logging::v2::LogBucket > >

virtual UpdateBucketAsync(google::logging::v2::UpdateBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateBucketRequest const &
Returns
Type Description
future< StatusOr< google::logging::v2::LogBucket > >

virtual CreateBucket(google::logging::v2::CreateBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateBucketRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

virtual UpdateBucket(google::logging::v2::UpdateBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateBucketRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogBucket >

virtual DeleteBucket(google::logging::v2::DeleteBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::DeleteBucketRequest const &
Returns
Type Description
Status

virtual UndeleteBucket(google::logging::v2::UndeleteBucketRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UndeleteBucketRequest const &
Returns
Type Description
Status

virtual ListViews(google::logging::v2::ListViewsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::ListViewsRequest
Returns
Type Description
StreamRange< google::logging::v2::LogView >

virtual GetView(google::logging::v2::GetViewRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetViewRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogView >

virtual CreateView(google::logging::v2::CreateViewRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateViewRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogView >

virtual UpdateView(google::logging::v2::UpdateViewRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateViewRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogView >

virtual DeleteView(google::logging::v2::DeleteViewRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::DeleteViewRequest const &
Returns
Type Description
Status

virtual ListSinks(google::logging::v2::ListSinksRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::ListSinksRequest
Returns
Type Description
StreamRange< google::logging::v2::LogSink >

virtual GetSink(google::logging::v2::GetSinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetSinkRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogSink >

virtual CreateSink(google::logging::v2::CreateSinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateSinkRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogSink >

virtual UpdateSink(google::logging::v2::UpdateSinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateSinkRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogSink >

virtual DeleteSink(google::logging::v2::DeleteSinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::DeleteSinkRequest const &
Returns
Type Description
Status

virtual CreateLink(google::logging::v2::CreateLinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateLinkRequest const &
Returns
Type Description
future< StatusOr< google::logging::v2::Link > >

virtual DeleteLink(google::logging::v2::DeleteLinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::DeleteLinkRequest const &
Returns
Type Description
future< StatusOr< google::logging::v2::LinkMetadata > >

virtual ListLinks(google::logging::v2::ListLinksRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::ListLinksRequest
Returns
Type Description
StreamRange< google::logging::v2::Link >

virtual GetLink(google::logging::v2::GetLinkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetLinkRequest const &
Returns
Type Description
StatusOr< google::logging::v2::Link >

virtual ListExclusions(google::logging::v2::ListExclusionsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::ListExclusionsRequest
Returns
Type Description
StreamRange< google::logging::v2::LogExclusion >

virtual GetExclusion(google::logging::v2::GetExclusionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetExclusionRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

virtual CreateExclusion(google::logging::v2::CreateExclusionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CreateExclusionRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

virtual UpdateExclusion(google::logging::v2::UpdateExclusionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateExclusionRequest const &
Returns
Type Description
StatusOr< google::logging::v2::LogExclusion >

virtual DeleteExclusion(google::logging::v2::DeleteExclusionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::DeleteExclusionRequest const &
Returns
Type Description
Status

virtual GetCmekSettings(google::logging::v2::GetCmekSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetCmekSettingsRequest const &
Returns
Type Description
StatusOr< google::logging::v2::CmekSettings >

virtual UpdateCmekSettings(google::logging::v2::UpdateCmekSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateCmekSettingsRequest const &
Returns
Type Description
StatusOr< google::logging::v2::CmekSettings >

virtual GetSettings(google::logging::v2::GetSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::GetSettingsRequest const &
Returns
Type Description
StatusOr< google::logging::v2::Settings >

virtual UpdateSettings(google::logging::v2::UpdateSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::UpdateSettingsRequest const &
Returns
Type Description
StatusOr< google::logging::v2::Settings >

virtual CopyLogEntries(google::logging::v2::CopyLogEntriesRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::logging::v2::CopyLogEntriesRequest const &
Returns
Type Description
future< StatusOr< google::logging::v2::CopyLogEntriesResponse > >