Class MockConfigConnection (2.26.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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UpdateDeployment(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual DeleteDeployment(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation 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(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Deployment > >

virtual UnlockDeployment(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation 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 >

virtual CreatePreview(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Preview > >

virtual GetPreview(google::cloud::config::v1::GetPreviewRequest 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::GetPreviewRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::Preview >

virtual ListPreviews(google::cloud::config::v1::ListPreviewsRequest)

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

virtual DeletePreview(ExperimentalTag, google::longrunning::Operation const &)

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

Parameters
Name Description
ExperimentalTag
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::config::v1::Preview > >

virtual ExportPreviewResult(google::cloud::config::v1::ExportPreviewResultRequest 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::ExportPreviewResultRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::ExportPreviewResultResponse >

virtual ListTerraformVersions(google::cloud::config::v1::ListTerraformVersionsRequest)

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

virtual GetTerraformVersion(google::cloud::config::v1::GetTerraformVersionRequest 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::GetTerraformVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::config::v1::TerraformVersion >