mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
fix build issue and check err
This commit is contained in:
@@ -167,7 +167,7 @@ var _ = ginkgo.Describe("API Workload", func() {
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
var r apis.Response
|
||||
err = json.Unmarshal(result, &r)
|
||||
gomega.Expect(http.StatusOK).Should(gomega.Equal(r.Code))
|
||||
gomega.Expect(http.StatusInternalServerError).Should(gomega.Equal(r.Code))
|
||||
output := fmt.Sprintf("required flag(s) \"image\" not set")
|
||||
gomega.Expect(r.Data.(string)).To(gomega.ContainSubstring(output))
|
||||
})
|
||||
|
||||
@@ -28,6 +28,10 @@ func CreateWorkload(c *gin.Context) {
|
||||
var template types.Capability
|
||||
|
||||
template, err := plugins.LoadCapabilityByName(body.WorkloadType)
|
||||
if err != nil {
|
||||
util.HandleError(c, util.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
appObj, err := oam.BaseComplete(evnName, body.WorkloadName, body.AppGroup, fs, template)
|
||||
if err != nil {
|
||||
util.HandleError(c, util.StatusInternalServerError, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user