(input *plugin.ApiResourceInput)
| 65 | } |
| 66 | |
| 67 | func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 68 | var connection models.AsanaConn |
| 69 | err := helper.Decode(input.Body, &connection, vld) |
| 70 | if err != nil { |
| 71 | return nil, err |
| 72 | } |
| 73 | if connection.Endpoint == "" { |
| 74 | connection.Endpoint = defaultAsanaEndpoint |
| 75 | } |
| 76 | result, err := testConnection(context.TODO(), connection) |
| 77 | if err != nil { |
| 78 | return nil, plugin.WrapTestConnectionErrResp(basicRes, err) |
| 79 | } |
| 80 | return &plugin.ApiResourceOutput{Body: result, Status: http.StatusOK}, nil |
| 81 | } |
| 82 | |
| 83 | func TestExistingConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 84 | connection, err := dsHelper.ConnApi.GetMergedConnection(input) |
nothing calls this directly
no test coverage detected