TestExistingConnection test gitlab connection @Summary test gitlab connection @Description Test gitlab Connection @Tags plugins/gitlab @Param connectionId path int true "connection ID" @Success 200 {object} GitlabTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure
(input *plugin.ApiResourceInput)
| 106 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 107 | // @Router /plugins/gitlab/connections/{connectionId}/test [POST] |
| 108 | func TestExistingConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 109 | connection, err := dsHelper.ConnApi.GetMergedConnection(input) |
| 110 | if err != nil { |
| 111 | return nil, errors.Convert(err) |
| 112 | } |
| 113 | if result, err := testConnection(context.TODO(), connection.GitlabConn); err != nil { |
| 114 | return nil, plugin.WrapTestConnectionErrResp(basicRes, err) |
| 115 | } else { |
| 116 | return &plugin.ApiResourceOutput{Body: result, Status: http.StatusOK}, nil |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | // @Summary create gitlab connection |
| 121 | // @Description Create gitlab connection |
nothing calls this directly
no test coverage detected