Class MockClusterManagerConnection (2.17.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
Type Description
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
Name Description
request google::container::v1::ListClustersRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::GetClusterRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::CreateClusterRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::UpdateClusterRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::UpdateNodePoolRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetNodePoolAutoscalingRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetLoggingServiceRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetMonitoringServiceRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetAddonsConfigRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetLocationsRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::UpdateMasterRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetMasterAuthRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::DeleteClusterRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::ListOperationsRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::GetOperationRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::CancelOperationRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::GetServerConfigRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::GetJSONWebKeysRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::ListNodePoolsRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::GetNodePoolRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::CreateNodePoolRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::DeleteNodePoolRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::CompleteNodePoolUpgradeRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::RollbackNodePoolUpgradeRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetNodePoolManagementRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetLabelsRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetLegacyAbacRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::StartIPRotationRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::CompleteIPRotationRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetNodePoolSizeRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetNetworkPolicyRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::SetMaintenancePolicyRequest const &
Returns
Type Description
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
Name Description
request google::container::v1::ListUsableSubnetworksRequest
Returns
Type Description
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
Name Description
request google::container::v1::CheckAutopilotCompatibilityRequest const &
Returns
Type Description
StatusOr< google::container::v1::CheckAutopilotCompatibilityResponse >