MCPcopy Index your code
hub / github.com/OverloadBlitz/cloudcent-cli / newTestClient

Function newTestClient

internal/api/client_test.go:21–35  ·  view source on GitHub ↗
(t *testing.T, withAuth bool, fn roundTripFunc)

Source from the content-addressed store, hash-verified

19}
20
21func newTestClient(t *testing.T, withAuth bool, fn roundTripFunc) *Client {
22 t.Helper()
23
24 client := &Client{
25 http: &http.Client{Transport: fn},
26 }
27 if withAuth {
28 apiKey := "test-api-key"
29 client.Config = &config.Config{
30 CliID: "test-cli-id",
31 APIKey: &apiKey,
32 }
33 }
34 return client
35}
36
37func response(status int, body string) *http.Response {
38 return &http.Response{

Calls

no outgoing calls

Tested by

no test coverage detected