mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
connect: task hook for bootstrapping envoy sidecar
Fixes #6041 Unlike all other Consul operations, boostrapping requires Consul be available. This PR tries Consul 3 times with a backoff to account for the group services being asynchronously registered with Consul.
This commit is contained in:
@@ -17,6 +17,14 @@ func RequireRoot(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// RequireConsul skips tests unless a Consul binary is available on $PATH.
|
||||
func RequireConsul(t *testing.T) {
|
||||
_, err := exec.Command("consul", "version").CombinedOutput()
|
||||
if err != nil {
|
||||
t.Skipf("Test requires Consul: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func ExecCompatible(t *testing.T) {
|
||||
if runtime.GOOS != "linux" || syscall.Geteuid() != 0 {
|
||||
t.Skip("Test only available running as root on linux")
|
||||
|
||||
Reference in New Issue
Block a user