MCPcopy
hub / github.com/cloudfoundry/cli / NewTestClient

Function NewTestClient

api/cloudcontroller/ccv3/ccv3_suite_test.go:46–66  ·  view source on GitHub ↗
(config ...Config)

Source from the content-addressed store, hash-verified

44}
45
46func NewTestClient(config ...Config) (*Client, *ccv3fakes.FakeClock) {
47 var client *Client
48 fakeClock := new(ccv3fakes.FakeClock)
49
50 if config != nil {
51 client = TestClient(config[0], fakeClock, NewRequester(config[0]))
52 } else {
53 singleConfig := Config{AppName: "CF CLI API V3 Test", AppVersion: "Unknown"}
54 client = TestClient(
55 singleConfig,
56 fakeClock,
57 NewRequester(singleConfig),
58 )
59 }
60 client.TargetCF(TargetSettings{
61 SkipSSLValidation: true,
62 URL: server.URL(),
63 })
64
65 return client, fakeClock
66}

Callers 15

process_test.goFile · 0.70
route_test.goFile · 0.70
errors_test.goFile · 0.70
role_test.goFile · 0.70
info_test.goFile · 0.70
stack_test.goFile · 0.70
user_test.goFile · 0.70

Calls 4

TargetCFMethod · 0.95
TestClientFunction · 0.85
NewRequesterFunction · 0.85
URLMethod · 0.45

Tested by

no test coverage detected