Class MockConfigConnection (2.20.0)

A class to mock ConfigConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ConfigClient. To do so, construct an object of type ConfigClient 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 ListDeployments(google::cloud::config::v1::ListDeploymentsRequest)

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::cloud::config::v1::ListDeploymentsRequest
Returns
Type Description
StreamRange< google::cloud::config::v1::Deployment >

virtual GetDeployment(google::cloud::config::v1::GetDeploymentRequest 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::cloud::config::v1::GetDeploymentRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Deployment >

virtual CreateDeployment(google::cloud::config::v1::CreateDeploymentRequest 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::cloud::config::v1::CreateDeploymentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UpdateDeployment(google::cloud::config::v1::UpdateDeploymentRequest 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::cloud::config::v1::UpdateDeploymentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual DeleteDeployment(google::cloud::config::v1::DeleteDeploymentRequest 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::cloud::config::v1::DeleteDeploymentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual ListRevisions(google::cloud::config::v1::ListRevisionsRequest)

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::cloud::config::v1::ListRevisionsRequest
Returns
Type Description
StreamRange< google::cloud::config::v1::Revision >

virtual GetRevision(google::cloud::config::v1::GetRevisionRequest 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::cloud::config::v1::GetRevisionRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Revision >

virtual GetResource(google::cloud::config::v1::GetResourceRequest 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::cloud::config::v1::GetResourceRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Resource >

virtual ListResources(google::cloud::config::v1::ListResourcesRequest)

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::cloud::config::v1::ListResourcesRequest
Returns
Type Description
StreamRange< google::cloud::config::v1::Resource >

virtual ExportDeploymentStatefile(google::cloud::config::v1::ExportDeploymentStatefileRequest 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::cloud::config::v1::ExportDeploymentStatefileRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Statefile >

virtual ExportRevisionStatefile(google::cloud::config::v1::ExportRevisionStatefileRequest 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::cloud::config::v1::ExportRevisionStatefileRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Statefile >

virtual ImportStatefile(google::cloud::config::v1::ImportStatefileRequest 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::cloud::config::v1::ImportStatefileRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Statefile >

virtual DeleteStatefile(google::cloud::config::v1::DeleteStatefileRequest 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::cloud::config::v1::DeleteStatefileRequest const &
Returns
Type Description
Status

virtual LockDeployment(google::cloud::config::v1::LockDeploymentRequest 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::cloud::config::v1::LockDeploymentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UnlockDeployment(google::cloud::config::v1::UnlockDeploymentRequest 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::cloud::config::v1::UnlockDeploymentRequest const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual ExportLockInfo(google::cloud::config::v1::ExportLockInfoRequest 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::cloud::config::v1::ExportLockInfoRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::LockInfo >