MCPcopy Index your code
hub / github.com/cloudfoundry/cli / SetConfiguration

Method SetConfiguration

integration/v7/selfcontained/fake/cf_api.go:33–43  ·  view source on GitHub ↗
(config CFAPIConfig)

Source from the content-addressed store, hash-verified

31}
32
33func (a *CFAPI) SetConfiguration(config CFAPIConfig) {
34 a.server.Reset()
35
36 for request, response := range config.Routes {
37 method, path := parseRequest(request)
38 responseBytes, err := json.Marshal(response.Body)
39 Expect(err).NotTo(HaveOccurred())
40
41 a.server.RouteToHandler(method, path, ghttp.RespondWith(response.Code, responseBytes))
42 }
43}
44
45func (a *CFAPI) Close() {
46 a.server.Close()

Calls 2

parseRequestFunction · 0.85
ResetMethod · 0.80

Tested by

no test coverage detected