2021-02-17 07:20:19 +03:00
|
|
|
package testutil
|
|
|
|
|
2021-03-08 14:59:35 +03:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2021-04-05 17:00:21 +03:00
|
|
|
"runtime"
|
2021-03-08 14:59:35 +03:00
|
|
|
)
|
|
|
|
|
2021-02-17 07:20:19 +03:00
|
|
|
// this can be overridden by ldflags
|
|
|
|
var (
|
2021-04-05 17:00:21 +03:00
|
|
|
HasuraVersion = "main-225403eda"
|
|
|
|
DockerSwitchIP = func() string {
|
|
|
|
switch runtime.GOOS {
|
|
|
|
case "darwin", "windows":
|
|
|
|
return "host.docker.internal"
|
|
|
|
default:
|
|
|
|
return "172.17.0.1"
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}()
|
2021-03-08 14:59:35 +03:00
|
|
|
Hostname = "localhost"
|
|
|
|
BaseURL = fmt.Sprintf("http://%s", Hostname)
|
|
|
|
MSSQLPassword = "MSSQLp@ssw0rd"
|
2021-04-01 15:58:24 +03:00
|
|
|
SkipDockerTests = func() bool {
|
2021-03-08 14:59:35 +03:00
|
|
|
if len(os.Getenv("CI")) > 0 {
|
|
|
|
// skip in CI
|
2021-04-01 15:58:24 +03:00
|
|
|
return true
|
2021-03-08 14:59:35 +03:00
|
|
|
}
|
2021-04-01 15:58:24 +03:00
|
|
|
return false
|
2021-03-08 14:59:35 +03:00
|
|
|
}()
|
2021-04-05 17:00:21 +03:00
|
|
|
CLIBinaryPath = "hasura"
|
2021-02-17 07:20:19 +03:00
|
|
|
)
|