TestExistingConnection tests an existing Taiga connection @Summary test existing taiga connection @Description Test Existing Taiga Connection @Tags plugins/taiga @Success 200 {object} TaigaTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.E
(input *plugin.ApiResourceInput)
| 152 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 153 | // @Router /plugins/taiga/connections/:connectionId/test [POST] |
| 154 | func TestExistingConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 155 | connection, err := dsHelper.ConnApi.GetMergedConnection(input) |
| 156 | if err != nil { |
| 157 | return nil, errors.BadInput.Wrap(err, "find connection from db") |
| 158 | } |
| 159 | // test connection |
| 160 | result, err := testConnection(context.TODO(), *connection) |
| 161 | if err != nil { |
| 162 | return nil, plugin.WrapTestConnectionErrResp(basicRes, err) |
| 163 | } |
| 164 | return &plugin.ApiResourceOutput{Body: result, Status: http.StatusOK}, nil |
| 165 | } |
| 166 | |
| 167 | // PostConnections creates a new Taiga connection |
| 168 | // @Summary create taiga connection |
nothing calls this directly
no test coverage detected