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