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

Function createAuthenticationRepository

cf/net/gateway_test.go:674–687  ·  view source on GitHub ↗
(apiServer *httptest.Server, authServer *httptest.Server)

Source from the content-addressed store, hash-verified

672}
673
674func createAuthenticationRepository(apiServer *httptest.Server, authServer *httptest.Server) (coreconfig.ReadWriter, authentication.Repository) {
675 config := testconfig.NewRepository()
676 config.SetAuthenticationEndpoint(authServer.URL)
677 config.SetAPIEndpoint(apiServer.URL)
678
679 authGateway := NewUAAGateway(config, new(terminalfakes.FakeUI), new(tracefakes.FakePrinter), "")
680 authGateway.SetTrustedCerts(authServer.TLS.Certificates)
681
682 fakePrinter := new(tracefakes.FakePrinter)
683 dumper := NewRequestDumper(fakePrinter)
684 authenticator := authentication.NewUAARepository(authGateway, config, dumper)
685
686 return config, authenticator
687}

Callers 1

gateway_test.goFile · 0.85

Calls 6

NewUAARepositoryFunction · 0.92
NewUAAGatewayFunction · 0.85
NewRequestDumperFunction · 0.85
SetTrustedCertsMethod · 0.80
SetAPIEndpointMethod · 0.65

Tested by

no test coverage detected