A class to mock BareMetalSolutionConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type BareMetalSolutionClient
. To do so, construct an object of type BareMetalSolutionClient
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
This function is implemented using gMock's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Returns |
Type |
Description |
Options |
|
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::baremetalsolution::v2::ListInstancesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::Instance > |
|
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::baremetalsolution::v2::GetInstanceRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Instance > |
|
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::baremetalsolution::v2::Instance > > |
|
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::baremetalsolution::v2::RenameInstanceRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Instance > |
|
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::baremetalsolution::v2::ResetInstanceResponse > > |
|
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::baremetalsolution::v2::StartInstanceResponse > > |
|
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::baremetalsolution::v2::StopInstanceResponse > > |
|
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::baremetalsolution::v2::EnableInteractiveSerialConsoleResponse > > |
|
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::baremetalsolution::v2::DisableInteractiveSerialConsoleResponse > > |
|
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::baremetalsolution::v2::Instance > > |
|
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::baremetalsolution::v2::ListSSHKeysRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::SSHKey > |
|
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::baremetalsolution::v2::CreateSSHKeyRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::SSHKey > |
|
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::baremetalsolution::v2::DeleteSSHKeyRequest const &
|
Returns |
Type |
Description |
Status |
|
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::baremetalsolution::v2::ListVolumesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::Volume > |
|
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::baremetalsolution::v2::GetVolumeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Volume > |
|
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::baremetalsolution::v2::Volume > > |
|
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::baremetalsolution::v2::RenameVolumeRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Volume > |
|
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::baremetalsolution::v2::OperationMetadata > > |
|
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::baremetalsolution::v2::Volume > > |
|
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::baremetalsolution::v2::ListNetworksRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::Network > |
|
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::baremetalsolution::v2::ListNetworkUsageRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::ListNetworkUsageResponse > |
|
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::baremetalsolution::v2::GetNetworkRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Network > |
|
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::baremetalsolution::v2::Network > > |
|
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::baremetalsolution::v2::CreateVolumeSnapshotRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::VolumeSnapshot > |
|
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::baremetalsolution::v2::VolumeSnapshot > > |
|
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::baremetalsolution::v2::DeleteVolumeSnapshotRequest const &
|
Returns |
Type |
Description |
Status |
|
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::baremetalsolution::v2::GetVolumeSnapshotRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::VolumeSnapshot > |
|
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::baremetalsolution::v2::ListVolumeSnapshotsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::VolumeSnapshot > |
|
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::baremetalsolution::v2::GetLunRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Lun > |
|
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::baremetalsolution::v2::ListLunsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::Lun > |
|
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::baremetalsolution::v2::OperationMetadata > > |
|
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::baremetalsolution::v2::GetNfsShareRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::NfsShare > |
|
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::baremetalsolution::v2::ListNfsSharesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::NfsShare > |
|
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::baremetalsolution::v2::NfsShare > > |
|
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::baremetalsolution::v2::NfsShare > > |
|
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::baremetalsolution::v2::RenameNfsShareRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::NfsShare > |
|
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::baremetalsolution::v2::OperationMetadata > > |
|
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::baremetalsolution::v2::ListProvisioningQuotasRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::ProvisioningQuota > |
|
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::baremetalsolution::v2::SubmitProvisioningConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::SubmitProvisioningConfigResponse > |
|
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::baremetalsolution::v2::GetProvisioningConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig > |
|
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::baremetalsolution::v2::CreateProvisioningConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig > |
|
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::baremetalsolution::v2::UpdateProvisioningConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig > |
|
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::baremetalsolution::v2::RenameNetworkRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::baremetalsolution::v2::Network > |
|
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::baremetalsolution::v2::ListOSImagesRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::baremetalsolution::v2::OSImage > |
|
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 > |
|
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 > |
|