Documentation
¶
Index ¶
- func CreateInstanceRequest(ctx context.Context, schema resource.SchemaResponse, model instance.Model) resource.CreateRequest
- func CreateInstanceTestModel(projectId, region, name, description string) instance.Model
- func CreateInstanceTokenRequest(ctx context.Context, schema resource.SchemaResponse, model token.Model) resource.CreateRequest
- func CreateResponse(schema resource.SchemaResponse) *resource.CreateResponse
- func DeleteInstanceRequest(ctx context.Context, schema resource.SchemaResponse, state instance.Model) resource.DeleteRequest
- func DeleteInstanceResponse(ctx context.Context, schema resource.SchemaResponse, ...) *resource.DeleteResponse
- func DeleteTokenRequest(ctx context.Context, schema resource.SchemaResponse, state token.Model) resource.DeleteRequest
- func DeleteTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.DeleteResponse
- func ReadInstanceRequest(ctx context.Context, schema resource.SchemaResponse, state instance.Model) resource.ReadRequest
- func ReadInstanceResponse(ctx context.Context, schema resource.SchemaResponse, ...) *resource.ReadResponse
- func ReadTokenRequest(ctx context.Context, schema resource.SchemaResponse, state token.Model) resource.ReadRequest
- func ReadTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.ReadResponse
- func UpdateInstanceRequest(ctx context.Context, schema resource.SchemaResponse, ...) resource.UpdateRequest
- func UpdateInstanceResponse(ctx context.Context, schema resource.SchemaResponse, ...) *resource.UpdateResponse
- func UpdateTokenRequest(ctx context.Context, schema resource.SchemaResponse, ...) resource.UpdateRequest
- func UpdateTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.UpdateResponse
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInstanceRequest ¶
func CreateInstanceRequest(ctx context.Context, schema resource.SchemaResponse, model instance.Model) resource.CreateRequest
func CreateInstanceTestModel ¶
func CreateInstanceTokenRequest ¶
func CreateInstanceTokenRequest(ctx context.Context, schema resource.SchemaResponse, model token.Model) resource.CreateRequest
func CreateResponse ¶
func CreateResponse(schema resource.SchemaResponse) *resource.CreateResponse
func DeleteInstanceRequest ¶
func DeleteInstanceRequest(ctx context.Context, schema resource.SchemaResponse, state instance.Model) resource.DeleteRequest
DeleteInstanceRequest creates a test Delete request
func DeleteInstanceResponse ¶
func DeleteInstanceResponse(ctx context.Context, schema resource.SchemaResponse, currentState *instance.Model) *resource.DeleteResponse
DeleteInstanceResponse creates a test Delete response Optionally initialize with current state to simulate Terraform framework behavior
func DeleteTokenRequest ¶
func DeleteTokenRequest(ctx context.Context, schema resource.SchemaResponse, state token.Model) resource.DeleteRequest
func DeleteTokenResponse ¶
func DeleteTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.DeleteResponse
func ReadInstanceRequest ¶
func ReadInstanceRequest(ctx context.Context, schema resource.SchemaResponse, state instance.Model) resource.ReadRequest
ReadInstanceRequest creates a test Read request
func ReadInstanceResponse ¶
func ReadInstanceResponse(ctx context.Context, schema resource.SchemaResponse, currentState *instance.Model) *resource.ReadResponse
ReadInstanceResponse creates a test Read response
func ReadTokenRequest ¶
func ReadTokenRequest(ctx context.Context, schema resource.SchemaResponse, state token.Model) resource.ReadRequest
func ReadTokenResponse ¶
func ReadTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.ReadResponse
func UpdateInstanceRequest ¶
func UpdateInstanceRequest(ctx context.Context, schema resource.SchemaResponse, currentState, plannedState instance.Model) resource.UpdateRequest
func UpdateInstanceResponse ¶
func UpdateInstanceResponse(ctx context.Context, schema resource.SchemaResponse, currentState *instance.Model) *resource.UpdateResponse
UpdateInstanceResponse creates a test Update response Optionally initialize with current state to simulate Terraform framework behavior
func UpdateTokenRequest ¶
func UpdateTokenRequest(ctx context.Context, schema resource.SchemaResponse, currentState, plannedState token.Model) resource.UpdateRequest
func UpdateTokenResponse ¶
func UpdateTokenResponse(ctx context.Context, schema resource.SchemaResponse, currentState *token.Model) *resource.UpdateResponse
Types ¶
type TestContext ¶
type TestContext struct {
T *testing.T
MockCtrl *gomock.Controller
MockInstanceCLient *mock_instance.MockDefaultAPI
MockServiceEnablementClient *mock_serviceenablement.MockDefaultAPI
Ctx context.Context
}
func NewTestContext ¶
func NewTestContext(t *testing.T) *TestContext
Click to show internal directories.
Click to hide internal directories.