Class MockCloudDeployConnection (2.32.0-rc)

A class to mock CloudDeployConnection.

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

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::deploy::v1::ListDeliveryPipelinesRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::DeliveryPipeline >

virtual GetDeliveryPipeline(google::cloud::deploy::v1::GetDeliveryPipelineRequest 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::deploy::v1::GetDeliveryPipelineRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::DeliveryPipeline >

virtual CreateDeliveryPipeline(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::DeliveryPipeline > >

virtual UpdateDeliveryPipeline(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::DeliveryPipeline > >

virtual DeleteDeliveryPipeline(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::OperationMetadata > >

virtual ListTargets(google::cloud::deploy::v1::ListTargetsRequest)

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::deploy::v1::ListTargetsRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::Target >

virtual RollbackTarget(google::cloud::deploy::v1::RollbackTargetRequest 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::deploy::v1::RollbackTargetRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::RollbackTargetResponse >

virtual GetTarget(google::cloud::deploy::v1::GetTargetRequest 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::deploy::v1::GetTargetRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::Target >

virtual CreateTarget(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Target > >

virtual UpdateTarget(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Target > >

virtual DeleteTarget(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::OperationMetadata > >

virtual ListCustomTargetTypes(google::cloud::deploy::v1::ListCustomTargetTypesRequest)

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::deploy::v1::ListCustomTargetTypesRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::CustomTargetType >

virtual GetCustomTargetType(google::cloud::deploy::v1::GetCustomTargetTypeRequest 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::deploy::v1::GetCustomTargetTypeRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::CustomTargetType >

virtual CreateCustomTargetType(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::CustomTargetType > >

virtual UpdateCustomTargetType(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::CustomTargetType > >

virtual DeleteCustomTargetType(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::OperationMetadata > >

virtual ListReleases(google::cloud::deploy::v1::ListReleasesRequest)

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::deploy::v1::ListReleasesRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::Release >

virtual GetRelease(google::cloud::deploy::v1::GetReleaseRequest 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::deploy::v1::GetReleaseRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::Release >

virtual CreateRelease(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Release > >

virtual AbandonRelease(google::cloud::deploy::v1::AbandonReleaseRequest 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::deploy::v1::AbandonReleaseRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::AbandonReleaseResponse >

virtual CreateDeployPolicy(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::DeployPolicy > >

virtual UpdateDeployPolicy(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::DeployPolicy > >

virtual DeleteDeployPolicy(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::OperationMetadata > >

virtual ListDeployPolicies(google::cloud::deploy::v1::ListDeployPoliciesRequest)

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::deploy::v1::ListDeployPoliciesRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::DeployPolicy >

virtual GetDeployPolicy(google::cloud::deploy::v1::GetDeployPolicyRequest 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::deploy::v1::GetDeployPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::DeployPolicy >

virtual ApproveRollout(google::cloud::deploy::v1::ApproveRolloutRequest 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::deploy::v1::ApproveRolloutRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::ApproveRolloutResponse >

virtual AdvanceRollout(google::cloud::deploy::v1::AdvanceRolloutRequest 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::deploy::v1::AdvanceRolloutRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::AdvanceRolloutResponse >

virtual CancelRollout(google::cloud::deploy::v1::CancelRolloutRequest 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::deploy::v1::CancelRolloutRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::CancelRolloutResponse >

virtual ListRollouts(google::cloud::deploy::v1::ListRolloutsRequest)

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::deploy::v1::ListRolloutsRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::Rollout >

virtual GetRollout(google::cloud::deploy::v1::GetRolloutRequest 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::deploy::v1::GetRolloutRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::Rollout >

virtual CreateRollout(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Rollout > >

virtual IgnoreJob(google::cloud::deploy::v1::IgnoreJobRequest 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::deploy::v1::IgnoreJobRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::IgnoreJobResponse >

virtual RetryJob(google::cloud::deploy::v1::RetryJobRequest 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::deploy::v1::RetryJobRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::RetryJobResponse >

virtual ListJobRuns(google::cloud::deploy::v1::ListJobRunsRequest)

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::deploy::v1::ListJobRunsRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::JobRun >

virtual GetJobRun(google::cloud::deploy::v1::GetJobRunRequest 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::deploy::v1::GetJobRunRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::JobRun >

virtual TerminateJobRun(google::cloud::deploy::v1::TerminateJobRunRequest 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::deploy::v1::TerminateJobRunRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::TerminateJobRunResponse >

virtual GetConfig(google::cloud::deploy::v1::GetConfigRequest 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::deploy::v1::GetConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::Config >

virtual CreateAutomation(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Automation > >

virtual UpdateAutomation(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::Automation > >

virtual DeleteAutomation(google::longrunning::Operation const &)

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

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::cloud::deploy::v1::OperationMetadata > >

virtual GetAutomation(google::cloud::deploy::v1::GetAutomationRequest 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::deploy::v1::GetAutomationRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::Automation >

virtual ListAutomations(google::cloud::deploy::v1::ListAutomationsRequest)

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::deploy::v1::ListAutomationsRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::Automation >

virtual GetAutomationRun(google::cloud::deploy::v1::GetAutomationRunRequest 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::deploy::v1::GetAutomationRunRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::AutomationRun >

virtual ListAutomationRuns(google::cloud::deploy::v1::ListAutomationRunsRequest)

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::deploy::v1::ListAutomationRunsRequest
Returns
Type Description
StreamRange< google::cloud::deploy::v1::AutomationRun >

virtual CancelAutomationRun(google::cloud::deploy::v1::CancelAutomationRunRequest 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::deploy::v1::CancelAutomationRunRequest const &
Returns
Type Description
StatusOr< google::cloud::deploy::v1::CancelAutomationRunResponse >

virtual ListLocations(google::cloud::location::ListLocationsRequest)

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::location::ListLocationsRequest
Returns
Type Description
StreamRange< google::cloud::location::Location >

virtual GetLocation(google::cloud::location::GetLocationRequest 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::location::GetLocationRequest const &
Returns
Type Description
StatusOr< google::cloud::location::Location >

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest 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::iam::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest 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::iam::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest 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::iam::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual ListOperations(google::longrunning::ListOperationsRequest)

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::longrunning::ListOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual GetOperation(google::longrunning::GetOperationRequest 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::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual DeleteOperation(google::longrunning::DeleteOperationRequest 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::longrunning::DeleteOperationRequest const &
Returns
Type Description
Status

virtual CancelOperation(google::longrunning::CancelOperationRequest 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::longrunning::CancelOperationRequest const &
Returns
Type Description
Status