Skip to content

Commit 76b9dec

Browse files
committed
fix tests
1 parent 7a08810 commit 76b9dec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

api/sys_plugins.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ func (c *Sys) RegisterPluginWithContext(ctx context.Context, i *RegisterPluginIn
242242
resp, err := c.c.rawRequestWithContext(ctx, req)
243243
if err == nil {
244244
defer resp.Body.Close()
245+
} else {
246+
return nil, err
245247
}
246248

247249
var registerResp RegisterPluginResponse

command/util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package command
55

66
import (
7+
"bytes"
78
"fmt"
89
"io"
910
"net/http"
@@ -193,6 +194,7 @@ func (r *recordingRoundTripper) RoundTrip(req *http.Request) (*http.Response, er
193194
r.body = body
194195
return &http.Response{
195196
StatusCode: 200,
197+
Body: io.NopCloser(bytes.NewReader([]byte(`{"warnings": []}`))),
196198
}, nil
197199
}
198200

0 commit comments

Comments
 (0)