X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/86e1730f97383b3ae1685445323aa253b99ee821..137ebf94ff14837c9df773533ea86e821469bda9:/sdk/go/arvadostest/run_servers.go diff --git a/sdk/go/arvadostest/run_servers.go b/sdk/go/arvadostest/run_servers.go index 7edc482639..d3b48ea9fb 100644 --- a/sdk/go/arvadostest/run_servers.go +++ b/sdk/go/arvadostest/run_servers.go @@ -22,6 +22,15 @@ func ResetEnv() { } } +// APIHost returns the address:port of the current test server. +func APIHost() string { + h := authSettings["ARVADOS_API_HOST"] + if h == "" { + log.Fatal("arvadostest.APIHost() was called but authSettings is not populated") + } + return h +} + // ParseAuthSettings parses auth settings from given input func ParseAuthSettings(authScript []byte) { scanner := bufio.NewScanner(bytes.NewReader(authScript))