(cfg config.Config, skipTlsValidation bool)
| 96 | } |
| 97 | |
| 98 | func verifyAuthServerConnection(cfg config.Config, skipTlsValidation bool) error { |
| 99 | credhubClient, err := credhub.New(cfg.ApiURL, credhub.CaCerts(cfg.CaCerts...), credhub.SkipTLSValidation(skipTlsValidation), credhub.SetHttpTimeout(cfg.HttpTimeout)) |
| 100 | if err != nil { |
| 101 | return err |
| 102 | } |
| 103 | if !skipTlsValidation { |
| 104 | request, _ := http.NewRequest("GET", cfg.AuthURL+"/info", nil) |
| 105 | request.Header.Add("Accept", "application/json") |
| 106 | _, err = credhubClient.Client().Do(request) |
| 107 | } |
| 108 | |
| 109 | return err |
| 110 | } |
no test coverage detected
searching dependent graphs…