MCPcopy Create free account
hub / github.com/dnote/dnote / setupGithubClient

Function setupGithubClient

pkg/cli/upgrade/upgrade_test.go:31–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func setupGithubClient(t *testing.T) (*github.Client, *http.ServeMux) {
32 mux := http.NewServeMux()
33 server := httptest.NewServer(mux)
34
35 url, err := url.Parse(server.URL + "/")
36 if err != nil {
37 t.Fatal(errors.Wrap(err, "parsing mock server url"))
38 }
39
40 client := github.NewClient(nil)
41 client.BaseURL = url
42 client.UploadURL = url
43
44 return client, mux
45}
46
47func TestFetchLatestStableTag(t *testing.T) {
48 tagCLI0_1_0 := "cli-v0.1.0"

Callers 2

TestFetchLatestStableTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected