(config ...Config)
| 44 | } |
| 45 | |
| 46 | func 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 | } |
no test coverage detected