integration: add cluster setup and configuration and a few tests

This commit is contained in:
Caleb Doxsey 2020-04-28 07:33:33 -06:00
parent 9860c3ce9f
commit 8fd716e1d8
24 changed files with 1689 additions and 2 deletions

View file

@ -0,0 +1,20 @@
// +build !linux
package cluster
import (
"context"
"os/exec"
"github.com/onsi/gocleanup"
)
func commandContext(ctx context.Context, name string, args ...string) *exec.Cmd {
cmd := exec.CommandContext(ctx, name, args...)
gocleanup.Register(func() {
if cmd.Process != nil {
_ = cmd.Process.Kill()
}
})
return cmd
}