InitCluster initializes the environment necessary for testing against an AIS cluster. NOTE: the function is also used for testing by NVIDIA/ais-k8s Operator
(proxyURL string, clusterType ClusterType)
| 155 | // NOTE: |
| 156 | // the function is also used for testing by NVIDIA/ais-k8s Operator |
| 157 | func InitCluster(proxyURL string, clusterType ClusterType) (err error) { |
| 158 | LoggedUserToken = authn.LoadToken("") |
| 159 | proxyURLReadOnly = proxyURL |
| 160 | testClusterType = clusterType |
| 161 | if err = initProxyURL(); err != nil { |
| 162 | return |
| 163 | } |
| 164 | initPmap() |
| 165 | return |
| 166 | } |
| 167 | |
| 168 | func initProxyURL() (err error) { |
| 169 | // Discover if a proxy is ready to accept requests. |
no test coverage detected