mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-15 01:57:45 +02:00
integration: add cluster setup and configuration and a few tests
This commit is contained in:
parent
9860c3ce9f
commit
8fd716e1d8
24 changed files with 1689 additions and 2 deletions
24
integration/internal/cluster/cmd_linux.go
Normal file
24
integration/internal/cluster/cmd_linux.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
// +build linux
|
||||
|
||||
package cluster
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/onsi/gocleanup"
|
||||
)
|
||||
|
||||
func commandContext(ctx context.Context, name string, args ...string) *exec.Cmd {
|
||||
cmd := exec.CommandContext(ctx, name, args...)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
Pdeathsig: syscall.SIGTERM,
|
||||
}
|
||||
gocleanup.Register(func() {
|
||||
if cmd.Process != nil {
|
||||
_ = cmd.Process.Kill()
|
||||
}
|
||||
})
|
||||
return cmd
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue