(apiServer *httptest.Server, authServer *httptest.Server)
| 672 | } |
| 673 | |
| 674 | func 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 | } |
no test coverage detected