SetAPI sets the API endpoint to the value of the CF_INT_API environment variable, or "https://api.bosh-lite.com" if not set. If the SKIP_SSL_VALIDATION environment variable is set, it will use the '--skip-ssl-validation' flag. It returns the API URL and a boolean indicating if SSL validation was ski
()
| 17 | // variable is set, it will use the '--skip-ssl-validation' flag. It returns the API |
| 18 | // URL and a boolean indicating if SSL validation was skipped. |
| 19 | func SetAPI() (string, bool) { |
| 20 | apiURL := GetAPI() |
| 21 | skipSSLValidation := SkipSSLValidation() |
| 22 | if skipSSLValidation { |
| 23 | Eventually(CF("api", apiURL, "--skip-ssl-validation")).Should(Exit(0)) |
| 24 | } else { |
| 25 | Eventually(CF("api", apiURL)).Should(Exit(0)) |
| 26 | } |
| 27 | return apiURL, skipSSLValidation |
| 28 | } |
| 29 | |
| 30 | // UnsetAPI unsets the currently set API endpoint for the CLI. |
| 31 | func UnsetAPI() { |
no test coverage detected