Skip to content

Commit dea2616

Browse files
committed
Fix up tests
1 parent 990b116 commit dea2616

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/api/cache_test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ func TestCacheResponse(t *testing.T) {
3131

3232
cacheDir := filepath.Join(t.TempDir(), "gh-cli-cache")
3333

34-
httpClient, _ := NewHTTPClient(
34+
httpClient, err := NewHTTPClient(
3535
ClientOptions{
36+
Host: "github.com",
37+
AuthToken: "token",
3638
Transport: fakeHTTP,
3739
EnableCache: true,
3840
CacheDir: cacheDir,
3941
LogIgnoreEnv: true,
40-
})
42+
},
43+
)
44+
assert.NoError(t, err)
4145

4246
do := func(method, url string, body io.Reader) (string, error) {
4347
req, err := http.NewRequest(method, url, body)
@@ -57,7 +61,6 @@ func TestCacheResponse(t *testing.T) {
5761
}
5862

5963
var res string
60-
var err error
6164

6265
res, err = do("GET", "http://example.com/path", nil)
6366
assert.NoError(t, err)

0 commit comments

Comments
 (0)