Class MockClusterManagerConnection (2.19.0)

A class to mock ClusterManagerConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ClusterManagerClient. To do so, construct an object of type ClusterManagerClient 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
TypeDescription
Options

virtual ListClusters(google::container::v1::ListClustersRequest const &)

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

Parameter
NameDescription
request google::container::v1::ListClustersRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::ListClustersResponse >

virtual GetCluster(google::container::v1::GetClusterRequest const &)

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

Parameter
NameDescription
request google::container::v1::GetClusterRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Cluster >

virtual CreateCluster(google::container::v1::CreateClusterRequest const &)

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

Parameter
NameDescription
request google::container::v1::CreateClusterRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual UpdateCluster(google::container::v1::UpdateClusterRequest const &)

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

Parameter
NameDescription
request google::container::v1::UpdateClusterRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual UpdateNodePool(google::container::v1::UpdateNodePoolRequest const &)

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

Parameter
NameDescription
request google::container::v1::UpdateNodePoolRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetNodePoolAutoscaling(google::container::v1::SetNodePoolAutoscalingRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetNodePoolAutoscalingRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetLoggingService(google::container::v1::SetLoggingServiceRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetLoggingServiceRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetMonitoringService(google::container::v1::SetMonitoringServiceRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetMonitoringServiceRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetAddonsConfig(google::container::v1::SetAddonsConfigRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetAddonsConfigRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetLocations(google::container::v1::SetLocationsRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetLocationsRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual UpdateMaster(google::container::v1::UpdateMasterRequest const &)

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

Parameter
NameDescription
request google::container::v1::UpdateMasterRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetMasterAuth(google::container::v1::SetMasterAuthRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetMasterAuthRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual DeleteCluster(google::container::v1::DeleteClusterRequest const &)

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

Parameter
NameDescription
request google::container::v1::DeleteClusterRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual ListOperations(google::container::v1::ListOperationsRequest const &)

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

Parameter
NameDescription
request google::container::v1::ListOperationsRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::ListOperationsResponse >

virtual GetOperation(google::container::v1::GetOperationRequest const &)

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

Parameter
NameDescription
request google::container::v1::GetOperationRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual CancelOperation(google::container::v1::CancelOperationRequest const &)

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

Parameter
NameDescription
request google::container::v1::CancelOperationRequest const &
Returns
TypeDescription
Status

virtual GetServerConfig(google::container::v1::GetServerConfigRequest const &)

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

Parameter
NameDescription
request google::container::v1::GetServerConfigRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::ServerConfig >

virtual GetJSONWebKeys(google::container::v1::GetJSONWebKeysRequest const &)

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

Parameter
NameDescription
request google::container::v1::GetJSONWebKeysRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::GetJSONWebKeysResponse >

virtual ListNodePools(google::container::v1::ListNodePoolsRequest const &)

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

Parameter
NameDescription
request google::container::v1::ListNodePoolsRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::ListNodePoolsResponse >

virtual GetNodePool(google::container::v1::GetNodePoolRequest const &)

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

Parameter
NameDescription
request google::container::v1::GetNodePoolRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::NodePool >

virtual CreateNodePool(google::container::v1::CreateNodePoolRequest const &)

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

Parameter
NameDescription
request google::container::v1::CreateNodePoolRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual DeleteNodePool(google::container::v1::DeleteNodePoolRequest const &)

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

Parameter
NameDescription
request google::container::v1::DeleteNodePoolRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual CompleteNodePoolUpgrade(google::container::v1::CompleteNodePoolUpgradeRequest const &)

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

Parameter
NameDescription
request google::container::v1::CompleteNodePoolUpgradeRequest const &
Returns
TypeDescription
Status

virtual RollbackNodePoolUpgrade(google::container::v1::RollbackNodePoolUpgradeRequest const &)

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

Parameter
NameDescription
request google::container::v1::RollbackNodePoolUpgradeRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetNodePoolManagement(google::container::v1::SetNodePoolManagementRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetNodePoolManagementRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetLabels(google::container::v1::SetLabelsRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetLabelsRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetLegacyAbac(google::container::v1::SetLegacyAbacRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetLegacyAbacRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual StartIPRotation(google::container::v1::StartIPRotationRequest const &)

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

Parameter
NameDescription
request google::container::v1::StartIPRotationRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual CompleteIPRotation(google::container::v1::CompleteIPRotationRequest const &)

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

Parameter
NameDescription
request google::container::v1::CompleteIPRotationRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetNodePoolSize(google::container::v1::SetNodePoolSizeRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetNodePoolSizeRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetNetworkPolicy(google::container::v1::SetNetworkPolicyRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetNetworkPolicyRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual SetMaintenancePolicy(google::container::v1::SetMaintenancePolicyRequest const &)

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

Parameter
NameDescription
request google::container::v1::SetMaintenancePolicyRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::Operation >

virtual ListUsableSubnetworks(google::container::v1::ListUsableSubnetworksRequest)

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

Parameter
NameDescription
request google::container::v1::ListUsableSubnetworksRequest
Returns
TypeDescription
StreamRange< google::container::v1::UsableSubnetwork >

virtual CheckAutopilotCompatibility(google::container::v1::CheckAutopilotCompatibilityRequest const &)

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

Parameter
NameDescription
request google::container::v1::CheckAutopilotCompatibilityRequest const &
Returns
TypeDescription
StatusOr< google::container::v1::CheckAutopilotCompatibilityResponse >