A class to mock AwsClustersConnection
.
Application developers may want to test their code with simulated responses, including errors, from an object of type AwsClustersClient
. To do so, construct an object of type AwsClustersClient
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 CreateAwsCluster(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::gkemulticloud::v1::AwsCluster > > |
|
virtual UpdateAwsCluster(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::gkemulticloud::v1::AwsCluster > > |
|
virtual GetAwsCluster(google::cloud::gkemulticloud::v1::GetAwsClusterRequest 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::gkemulticloud::v1::GetAwsClusterRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::AwsCluster > |
|
virtual ListAwsClusters(google::cloud::gkemulticloud::v1::ListAwsClustersRequest)
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::gkemulticloud::v1::ListAwsClustersRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::gkemulticloud::v1::AwsCluster > |
|
virtual DeleteAwsCluster(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::gkemulticloud::v1::OperationMetadata > > |
|
virtual GenerateAwsClusterAgentToken(google::cloud::gkemulticloud::v1::GenerateAwsClusterAgentTokenRequest 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::gkemulticloud::v1::GenerateAwsClusterAgentTokenRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::GenerateAwsClusterAgentTokenResponse > |
|
virtual GenerateAwsAccessToken(google::cloud::gkemulticloud::v1::GenerateAwsAccessTokenRequest 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::gkemulticloud::v1::GenerateAwsAccessTokenRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::GenerateAwsAccessTokenResponse > |
|
virtual CreateAwsNodePool(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::gkemulticloud::v1::AwsNodePool > > |
|
virtual UpdateAwsNodePool(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::gkemulticloud::v1::AwsNodePool > > |
|
virtual RollbackAwsNodePoolUpdate(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::gkemulticloud::v1::AwsNodePool > > |
|
virtual GetAwsNodePool(google::cloud::gkemulticloud::v1::GetAwsNodePoolRequest 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::gkemulticloud::v1::GetAwsNodePoolRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::AwsNodePool > |
|
virtual ListAwsNodePools(google::cloud::gkemulticloud::v1::ListAwsNodePoolsRequest)
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::gkemulticloud::v1::ListAwsNodePoolsRequest
|
Returns |
Type |
Description |
StreamRange< google::cloud::gkemulticloud::v1::AwsNodePool > |
|
virtual DeleteAwsNodePool(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::gkemulticloud::v1::OperationMetadata > > |
|
virtual GetAwsOpenIdConfig(google::cloud::gkemulticloud::v1::GetAwsOpenIdConfigRequest 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::gkemulticloud::v1::GetAwsOpenIdConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::AwsOpenIdConfig > |
|
virtual GetAwsJsonWebKeys(google::cloud::gkemulticloud::v1::GetAwsJsonWebKeysRequest 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::gkemulticloud::v1::GetAwsJsonWebKeysRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::AwsJsonWebKeys > |
|
virtual GetAwsServerConfig(google::cloud::gkemulticloud::v1::GetAwsServerConfigRequest 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::gkemulticloud::v1::GetAwsServerConfigRequest const &
|
Returns |
Type |
Description |
StatusOr< google::cloud::gkemulticloud::v1::AwsServerConfig > |
|