Send feedback
Class MockInstanceAdminConnection (2.22.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.22.0 keyboard_arrow_down
Application developers may want to test their code with simulated responses, including errors from a spanner::InstanceAdminClient
. To do so, construct a spanner::InstanceAdminClient
with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.
Functions
GetInstance(GetInstanceParams)
Return the metadata for the given instance.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
GetInstanceParams
Returns Type Description StatusOr< google::spanner::admin::instance::v1::Instance >
CreateInstance(CreateInstanceParams)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description p
CreateInstanceParams
Returns Type Description future< StatusOr< google::spanner::admin::instance::v1::Instance > >
UpdateInstance(UpdateInstanceParams)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description p
UpdateInstanceParams
Returns Type Description future< StatusOr< google::spanner::admin::instance::v1::Instance > >
DeleteInstance(DeleteInstanceParams)
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description p
DeleteInstanceParams
Returns Type Description Status
GetInstanceConfig(GetInstanceConfigParams)
Return the InstanceConfig with the given name.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
GetInstanceConfigParams
Returns Type Description StatusOr< google::spanner::admin::instance::v1::InstanceConfig >
ListInstanceConfigs(ListInstanceConfigsParams)
Returns a one-pass input range with all the instance configs.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
ListInstanceConfigsParams
Returns Type Description ListInstanceConfigsRange
ListInstances(ListInstancesParams)
Returns a one-pass input range with all the instances meeting the requirements in params
.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description params
ListInstancesParams
Returns Type Description ListInstancesRange
GetIamPolicy(GetIamPolicyParams)
Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
GetIamPolicyParams
Returns Type Description StatusOr< google::iam::v1::Policy >
SetIamPolicy(SetIamPolicyParams)
Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
SetIamPolicyParams
Returns Type Description StatusOr< google::iam::v1::Policy >
TestIamPermissions(TestIamPermissionsParams)
Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC.
This function is implemented using gMock 's MOCK_METHOD()
.
Consult the gMock documentation to use this mock in your tests.
Parameter Name Description
TestIamPermissionsParams
Returns Type Description StatusOr< google::iam::v1::TestIamPermissionsResponse >
virtual options()
Returns Type Description Options
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-30 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[],[]]