Skip to content

Commit 88ec5b0

Browse files
lijianguojianxiaoguo
authored andcommitted
chore(controller-sdk-go): add volume expand support use patch
1 parent de65d8c commit 88ec5b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

volumes/volumes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func Expand(c *drycc.Client, appID string, volume api.Volume) (api.Volume, error
4949
return api.Volume{}, err
5050
}
5151
u := fmt.Sprintf("/v2/apps/%s/volumes/%s/", appID, volume.Name)
52-
res, reqErr := c.Request("PUT", u, body)
52+
res, reqErr := c.Request("PATCH", u, body)
5353
if reqErr != nil {
5454
return api.Volume{}, reqErr
5555
}

volumes/volumes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (f *fakeHTTPServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {
122122
}
123123

124124
// Expand
125-
if req.URL.Path == "/v2/apps/example-go/volumes/myvolume/" && req.Method == "PUT" {
125+
if req.URL.Path == "/v2/apps/example-go/volumes/myvolume/" && req.Method == "PATCH" {
126126
body, err := ioutil.ReadAll(req.Body)
127127

128128
if err != nil {

0 commit comments

Comments
 (0)