summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/api')
-rw-r--r--src/k8splugin/api/defhandler.go6
-rw-r--r--src/k8splugin/api/defhandler_test.go10
2 files changed, 0 insertions, 16 deletions
diff --git a/src/k8splugin/api/defhandler.go b/src/k8splugin/api/defhandler.go
index 21e5e768..44521dd1 100644
--- a/src/k8splugin/api/defhandler.go
+++ b/src/k8splugin/api/defhandler.go
@@ -54,12 +54,6 @@ func (h rbDefinitionHandler) createHandler(w http.ResponseWriter, r *http.Reques
return
}
- // Chart Name is required
- if v.ChartName == "" {
- http.Error(w, "Missing chart name in POST request", http.StatusBadRequest)
- return
- }
-
ret, err := h.client.Create(v)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
diff --git a/src/k8splugin/api/defhandler_test.go b/src/k8splugin/api/defhandler_test.go
index 20ef537e..48e2406c 100644
--- a/src/k8splugin/api/defhandler_test.go
+++ b/src/k8splugin/api/defhandler_test.go
@@ -125,16 +125,6 @@ func TestRBDefCreateHandler(t *testing.T) {
expectedCode: http.StatusBadRequest,
rbDefClient: &mockRBDefinition{},
},
- {
- label: "Missing Chart Name in Request Body",
- reader: bytes.NewBuffer([]byte(`{
- "name":"testresourcebundle",
- "description":"test description",
- "service-type":"firewall"
- }`)),
- expectedCode: http.StatusBadRequest,
- rbDefClient: &mockRBDefinition{},
- },
}
for _, testCase := range testCases {