Class MockEdgeContainerConnection (2.33.0)

A class to mock EdgeContainerConnection.

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

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::edgecontainer::v1::ListClustersRequest
Returns
Type Description
StreamRange< google::cloud::edgecontainer::v1::Cluster >

virtual GetCluster(google::cloud::edgecontainer::v1::GetClusterRequest 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::edgecontainer::v1::GetClusterRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::Cluster >

virtual CreateCluster(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::edgecontainer::v1::Cluster > >

virtual UpdateCluster(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::edgecontainer::v1::Cluster > >

virtual UpgradeCluster(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::edgecontainer::v1::Cluster > >

virtual DeleteCluster(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::edgecontainer::v1::OperationMetadata > >

virtual GenerateAccessToken(google::cloud::edgecontainer::v1::GenerateAccessTokenRequest 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::edgecontainer::v1::GenerateAccessTokenRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::GenerateAccessTokenResponse >

virtual GenerateOfflineCredential(google::cloud::edgecontainer::v1::GenerateOfflineCredentialRequest 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::edgecontainer::v1::GenerateOfflineCredentialRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::GenerateOfflineCredentialResponse >

virtual ListNodePools(google::cloud::edgecontainer::v1::ListNodePoolsRequest)

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::edgecontainer::v1::ListNodePoolsRequest
Returns
Type Description
StreamRange< google::cloud::edgecontainer::v1::NodePool >

virtual GetNodePool(google::cloud::edgecontainer::v1::GetNodePoolRequest 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::edgecontainer::v1::GetNodePoolRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::NodePool >

virtual CreateNodePool(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::edgecontainer::v1::NodePool > >

virtual UpdateNodePool(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::edgecontainer::v1::NodePool > >

virtual DeleteNodePool(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::edgecontainer::v1::OperationMetadata > >

virtual ListMachines(google::cloud::edgecontainer::v1::ListMachinesRequest)

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::edgecontainer::v1::ListMachinesRequest
Returns
Type Description
StreamRange< google::cloud::edgecontainer::v1::Machine >

virtual GetMachine(google::cloud::edgecontainer::v1::GetMachineRequest 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::edgecontainer::v1::GetMachineRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::Machine >

virtual ListVpnConnections(google::cloud::edgecontainer::v1::ListVpnConnectionsRequest)

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::edgecontainer::v1::ListVpnConnectionsRequest
Returns
Type Description
StreamRange< google::cloud::edgecontainer::v1::VpnConnection >

virtual GetVpnConnection(google::cloud::edgecontainer::v1::GetVpnConnectionRequest 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::edgecontainer::v1::GetVpnConnectionRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::VpnConnection >

virtual CreateVpnConnection(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::edgecontainer::v1::VpnConnection > >

virtual DeleteVpnConnection(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::edgecontainer::v1::OperationMetadata > >

virtual GetServerConfig(google::cloud::edgecontainer::v1::GetServerConfigRequest 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::edgecontainer::v1::GetServerConfigRequest const &
Returns
Type Description
StatusOr< google::cloud::edgecontainer::v1::ServerConfig >

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 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