mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Add option to execute Tests for release (#178)
* Add button to execute tests * Create API to execute tests * Add modal for Test response * Make API call to execute tests and show response in modal * Clean up * Update docs - feature execute tests for a release * Add arg '--logs' to 'helm test' cmd * Wait for API to complete before sending back response to frontend * Add loading spinner until reponse for 'helm test' is returned from backend by API * Clean-up Co-authored-by: Harshit Mehta <harshitm@nvidia.com>
This commit is contained in:
@@ -176,6 +176,22 @@ func (h *HelmHandler) Install(c *gin.Context) {
|
||||
c.String(http.StatusAccepted, out)
|
||||
}
|
||||
|
||||
func (h *HelmHandler) Tests(c *gin.Context) {
|
||||
qp, err := utils.GetQueryProps(c, false)
|
||||
if err != nil {
|
||||
_ = c.AbortWithError(http.StatusBadRequest, err)
|
||||
return
|
||||
}
|
||||
|
||||
out, err := h.Data.RunTests(qp.Namespace, qp.Name)
|
||||
if err != nil {
|
||||
_ = c.AbortWithError(http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
|
||||
c.String(http.StatusOK, out)
|
||||
}
|
||||
|
||||
func (h *HelmHandler) GetInfoSection(c *gin.Context) {
|
||||
qp, err := utils.GetQueryProps(c, true)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user