MCPcopy Index your code
hub / github.com/actions/actions-runner-controller / newTestClient

Function newTestClient

github/github_test.go:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14var server *httptest.Server
15
16func newTestClient() *Client {
17 c := Config{
18 Token: "token",
19 }
20 client, err := c.NewClient()
21 if err != nil {
22 panic(err)
23 }
24
25 baseURL, err := url.Parse(server.URL + "/")
26 if err != nil {
27 panic(err)
28 }
29 client.BaseURL = baseURL
30
31 return client
32}
33
34func TestMain(m *testing.M) {
35 res := &fake.FixedResponses{

Callers 5

TestGetRegistrationTokenFunction · 0.85
TestListRunnersFunction · 0.85
TestRemoveRunnerFunction · 0.85
TestCleanupFunction · 0.85
TestUserAgentFunction · 0.85

Calls 1

NewClientMethod · 0.95

Tested by

no test coverage detected